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
See original GitHub issueThe 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);
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Why can't nested describe() blocks see vars defined in outer ...
The body of a describe block is executed before the beforeEach blocks. This is exactly as expected. The problem is that your var...
Read more >Changelog - Cypress Documentation
In Cypress 12, we enforce running tests in a clean browser context through test isolation. This option is configurable, but is enabled by...
Read more >Vitis Unified Software Platform Documentation | Xilinx
The hardware component, or kernel, can be developed using. C/C++, OpenCL C, or RTL. The Vitis software platform promotes concurrent development and test...
Read more >doc - Apple Open Source
According to the ES6 spec if a user tries to get, set, or define a property on a neutered TypedArray we should throw...
Read more >mozilla-release: changeset 469211 ...
devtools/client/debugger/new/test/mochitest/browser_dbg-expressions-error.js ... If a copy of the MPL was not distributed with this * file, You can obtain ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just reproduced this in our app. Here is an example test that reproduces the error: https://github.com/efx/ember-mocha/commit/560abc959fe70abd8baf8313eeecb055117aebe0
@rreckonerr I deleted my fork and that work; apologies! I will take a look later today to see if I have a copy locally. I reduced the example to the most basic form. You should be able to see the issue by simply nesting the 2nd describe in the first one. For the record, our team avoids nesting
describe
blocks in our ember application because of this.