Skip to content

Component tests run fine if in the 'root' describe block, but throw 'You have turned on testing mode, which disabled the run-loop's autorun' error when in nested describe blocks #132

@fushi

Description

@fushi

The following pseudo code works fine:

describe('Unit | Component | common | input-with-validation', function() {
  setupComponentTest('componentToTest', {
    needs: [],
    unit: true
  });
  beforeEach(function () {
    component = this.subject();
  });

  it('Test Observer', function() {
    component.set('observedKey', true);
  }
}

but the following does not, and raises an assertion error: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in a run

describe('Unit | Component | common | input-with-validation', function() {
  setupComponentTest('componentToTest', {
    needs: [],
    unit: true
  });

  beforeEach(function () {
    component = this.subject();
  });

  describe('Observers', function () {
    it('Test Observer', function() {
      component.set('observedKey', true);
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions