Commit Graph

227 Commits

Author SHA1 Message Date
Elliot Nelson 72aa0bbe4d Add resolveValue and rejectValue spy strategies 2019-05-05 08:08:34 -04:00
johnjbarton a8c2399dd8 feat(result.duration): report test duration in ms
Wrap spec start/complete in Timer start/elapsed.
configuration.timeSpecDuration = false will disable feature.

 * Add Suite result.duration, elapsed time in ms

 * Remove timeSpecDuration option.

 * Respond to review, use noopTimer
2019-03-14 09:13:57 -07:00
Felix Rilling dde93ade18 Fixed typos in comments. 2019-03-10 11:04:33 +01:00
johnjbarton c36a005893 Support Error.stack in globalErrors.
See https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror
2019-01-03 16:14:23 -08:00
Gregg Van Hove 2d303a6e46 Merge common async/sync expectation stuff 2018-10-24 16:17:30 -07:00
Gregg Van Hove 1e47dcf2cc Pull async matchers out to their own functions
- Makes AsyncExpectation closer to Expectation
2018-10-23 16:02:31 -07:00
Gregg Van Hove 92d0882a32 Introduce a configuration object to Env deprecating old single use functions
[finishes #159158038]
2018-09-25 17:08:41 -07:00
Gregg Van Hove afa18e554c Correctly expost spyOnAllFunctions
- See #1581
2018-08-14 17:11:50 -07:00
Ilya Konstantinov 8c1b80daae Improve Jasmine timeout error message 2018-06-18 17:36:43 -07:00
Gregg Van Hove e2895a92dc Fix JSDoc naming for Env functions
- See #1565
2018-06-06 17:13:52 -07:00
Gregg Van Hove 03998c1b20 Add documentation for more public functions on Env
- Fixes #1565
2018-06-05 17:13:58 -07:00
Steve Gravrock 9472df0db4 Added a basic set of async matchers
- Fixes #1447
- Fixes #1547
2018-06-04 21:07:44 -07:00
SamFare 92d33c79c7 Implemented hiding of disabled specs 2018-05-22 13:30:33 +01:00
yinm 4d0b47ac4c Fix typo from incimplete to incomplete 2018-05-03 17:46:49 +09:00
Fangzhou Li fbcdbf5ab1 Allow omitting the name argument: createSpy(func) 2018-04-29 06:07:22 +08:00
Gregg Van Hove c440d13754 Use the same global for everything in Env
- No longer use `getGlobal` for clearStack and QueueRunner
2018-04-13 17:14:48 -07:00
Gregg Van Hove a978f50f1d name new global status stuff correctly in API docs 2018-04-02 17:20:39 -07:00
Steve Gravrock 74287c578c Check for accidental global variable creation 2018-03-25 12:01:50 -07:00
Gregg Van Hove 85b2a8c6c4 add some links to more tutorials from the api docs 2018-03-01 10:48:18 -08:00
Steve Gravrock 1ac2a6f608 Allow node to report load time errors
[Fixes #153466462]
2018-02-17 15:45:42 -08:00
Gregg Van Hove 2b27bd393f Add API docs for async reporters 2018-02-15 14:36:29 -08:00
Tony Brix a8a5b839ab allow adding a deprecation object 2018-02-07 22:44:32 -06:00
Gregg Van Hove 764d58a7f5 Merge branch 'master' into 3.0-features
- cleaning up 2.99 deprecations
2018-02-06 09:31:51 -08:00
Gregg Van Hove c142490c69 Add deprecation messages for things that will change/break in 3.0
[#154746527]
2018-02-05 14:01:46 -08:00
Gregg Van Hove 5afe1222f4 Add ability to report deprecation warnings from within the suite
[#154746527]
2018-02-05 11:19:15 -08:00
Gregg Van Hove e15f273f06 Replace old "catch exceptions" logic with proper fail fast with error reporting
- Option is called stopOnSpecFailure

[#85966014]
- See #414
- See jasmine/jasmine-npm#16
2018-01-30 11:36:56 -08:00
Gregg Van Hove 50cd6fdd68 Allow reporter callbacks to be asynchronous
[finishes #154673961]
- Fixes #842

Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-29 11:55:41 -08:00
Gregg Van Hove 6b156ca6d1 Unify status for xdescribe and xit
- Ensure *All's only execute if at least one child will run
- Specs will report a status of `excluded` instead of disabled

[finishes #153967580]
- #1418

Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-25 16:17:31 -08:00
Elenore Bastian 12a47f05bf Suite level errors all report the same way (on suiteDone)
- For `beforeAll`, `afterAll`, and declaration errors

[#150118881] #1409

Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
2018-01-23 10:15:28 -08:00
Steve Gravrock 4934e420b2 Allow adding custom spy strategies
[#37288941]
2018-01-10 08:59:19 -08:00
Steve Gravrock 1085914a76 Extracted a SpyFactory to slim Env down a bit 2018-01-09 13:32:28 -08:00
Steve Gravrock 6f119c4e5a Moved createSpy to env so it can be stateful 2018-01-09 10:16:02 -08:00
Steve Gravrock 298b5ba127 Moved createSpyObj to env so it can be stateful 2018-01-09 09:53:45 -08:00
Steve Gravrock eb93d38294 Allow jasmine-npm to handle its own load errors
[Fixes #153466462]
2017-12-08 09:17:10 -08:00
Steve Gravrock db615e4186 Determine overall status in core, not reporters
[#92261606]
[#78679648]
2017-11-17 14:24:12 -08:00
Steve Gravrock 82eeed3c85 Improved reporting of load errors and afterAll errors
- Pass file and line number to reporters when present
- Show file and line number in the HTML reporter when present
- Visually separate adjacent errors in the HTML reporter

[#24901981]
2017-11-04 10:28:42 -07:00
Steve Gravrock 26a7bc6acf Report loading errors as loading errors, not afterAll errors
[#24901981]
2017-11-01 14:09:29 -07:00
Steve Gravrock bd250f27c7 Fail if error events (e.g. syntax errors) occur during loading
[#24901981]
2017-10-31 21:16:00 -07:00
Steve Gravrock e31db20ec7 Default to running tests in random order
[Finishes #109197518]
2017-10-27 08:50:40 -07:00
ksvitkovsky 7ca571a746 Remove runnable parameter for simplicity 2017-08-10 23:08:59 +04:00
ksvitkovsky 4240b3514b Check runnable instead of suite 2017-08-10 22:58:30 +04:00
ksvitkovsky ab116fbd0f Throw an error on nested methods 2017-08-10 22:05:13 +04:00
Gregg Van Hove 1926fc11ae Add jsdocs for reporter events 2017-08-09 10:21:59 -07:00
Steve Gravrock 585287b9d6 When stop on failure is enabled, skip subsequent it() and beforeEach().
Note: afterEach() functions are still run, because skipping them is
highly likely to pollute specs that run after the failure.

[Finishes #92252330]

- Fixes #577
- Fixes #807
2017-06-19 13:48:43 -07:00
Gregg Van Hove 3372af1cf1 Merge branch 'seed-reporting' of https://github.com/sgravrock/jasmine into sgravrock-seed-reporting
- Merges #1348 from @sgravrock
2017-05-23 14:12:49 -07:00
Steve Gravrock 9672689d40 Added support for ES2017 async functions 2017-05-12 14:42:14 -07:00
Steve Gravrock b1e97cfb09 Correctly route errors that occur while a QueueRunner is clearing stack
Besides surfacing the error in the hopefully-correct place, this also
prevents the queue runners for sibling suites from interleaving, which
in turn prevents all kinds of internal state corruption.

Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
2017-05-09 15:01:18 -07:00
Steve Gravrock e6a7932ec1 Report the random seed at the beginning and end of execution
This allows reporters to provide the seed to the user even in cases
where Jasmine crashes before completing.
2017-05-08 12:09:17 -07:00
Tony Brix d2b33e0c66 allow undefined as function 2017-04-26 13:49:13 -07:00
Gregg Van Hove 19b83a7434 Throw a recognizable Error message when fail outside of a spec.
Fixes #1017
2017-04-11 12:02:29 -07:00