You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading modules, if one module has an error in it (example: it could not import another module due to a typo in the import statement), the test should fail:
Example code:
import{something}from'./somewhere.js';describe...
If "somewhere.js" does not exists, the test should fail.
Current Behavior
Today, the test pass, skipping the "failing-test.js" as it did not exists.
=> It shows:
09 11 2020 11:52:49.258:INFO [karma-server]: Karma v5.2.3 server started at http://localhost:9876/
09 11 2020 11:52:49.259:INFO [launcher]: Launching browsers ChromiumHeadless with concurrency unlimited
09 11 2020 11:52:49.263:INFO [launcher]: Starting browser ChromiumHeadless
09 11 2020 11:52:49.542:INFO [Chrome Headless 86.0.4240.183 (Linux x86_64)]: Connected on socket pCX5O55W4Zk2P-JAAAAA with id 38747259
==> 09 11 2020 11:52:49.592:WARN [web-server]: 404: /base/tests/something.js
Chrome Headless 86.0.4240.183 (Linux x86_64): Executed 1 of 1 SUCCESS (0.003 secs / 0.001 secs)
TOTAL: 1 SUCCESS
While obviously, the second test did not run and should be in error
Possible Solution
When importing a test file, it should catch the error:
import('failing-test.js')
.then(
() => jasmine current behavior,
() => the file failed to load, it should fail the test
),
Using karma with jasmine.
Expected Behavior
When loading modules, if one module has an error in it (example: it could not import another module due to a typo in the import statement), the test should fail:
Example code:
If "somewhere.js" does not exists, the test should fail.
Current Behavior
Today, the test pass, skipping the "failing-test.js" as it did not exists.
=> It shows:
While obviously, the second test did not run and should be in error
Possible Solution
When importing a test file, it should catch the error:
Suite that reproduces the behavior (for bugs)
See https://github.com/jehon/example-jasmine for a bare minimal example
Your Environment
Reported initially at jasmine/jasmine#1865 , but redirected here.
The text was updated successfully, but these errors were encountered: