Comments (3)
Thank you for this bug report. This is occurring because this framework must call all the describe blocks in every instance, even those that contain it()s that will only be run in another instance. It is difficult and error-prone to fake the entire executing API of this
for each describe.
As opposed to mocking the API, it might be easiest to put the this.timeout() in a before()
or beforeAll()
. Those will only be called in the instances that will actually run each test spec.
Example:
Instead of
describe('some_module/some_component', function() {
this.timeout(10000);
// Setup and run some tests
...
});
Try this
describe('some_module/some_component', function() {
before(function() { // Runs once
this.timeout(10000);
});
// Setup and run some tests
...
});
from karma-parallel.
This approach works! I think if this is the only non-standard thing we have to do that I can get onboard with this approach.
I'm hesitant to deviate too much from following the mocha docs, but this exception alone would be worth it.
Coming across another issue that I'll open a separate ticket for.
from karma-parallel.
For me, this
is accessible and set timeout works in the before
statement but it's reset in the it
statement. As a workaround,
describe("component", () => {
it("description", function(done) {
this.timeout(10000); // place the timeout here make it works as expected.
...
});
});
FYI, the code was as follow
describe("component", () => {
it("description", (done) => {
...
}).timeout(10000); // was set timeout here.
});
from karma-parallel.
Related Issues (20)
- karma-parallel do not return exit code 1 anymore on too low code coverage HOT 7
- Exception when using "karma run" HOT 7
- Should fail the test cases split to a browser that is disconnected HOT 4
- Aggregated Log Output HOT 10
- No support for Circle CI HOT 2
- Support Karma 4 HOT 1
- When browser disconnects, remaining tests are skipped HOT 5
- Random failures with uncaught errors and missing tests
- Jasmine test timeout is ignored HOT 1
- Random test failures during CI process
- How to enable running tests in parallel on CI
- Publish new version HOT 2
- No calculation of all passed tests on kubernetis -job
- Script Error while executing karma tests HOT 1
- Only supporting Jasmine ?
- Karma parallel cannot find any tests after starting Chrome
- Need help to get code coverage HOT 3
- `Parallel` throws away global beforeEach in multi-browser mode
- Is there a way to let what files to run in what threads/browser instances ?
- failSpecWithNoExpectations to true in jasmine and karma-parallel add the extra tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-parallel.