Commit Graph

165 Commits

Author SHA1 Message Date
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
Gregg Van Hove 7f8f2b5e7a Update jsDocs to something close to full coverage for public API
- #596
2017-03-23 12:20:08 -07:00
Gregg Van Hove 9cb2f06aa6 Add a first pass at jsdoc.
[##130415655] #596
2017-03-21 11:36:41 -07:00
Gregg Van Hove a37b6c0d32 Merge branch 'master' of https://github.com/mmmichl/jasmine into mmmichl-master
- Merges #1283 from @mmmichl
2017-03-14 17:50:28 -07:00
Gregg Van Hove 1042c9a2dd Collect unhandled exceptions and pass them to the current runnable
Fixes #529
Fixes #937
2017-03-07 16:32:11 -08:00
mmmichl 8807bbb850 Pretty print objects passed to fail method
Fixes #1090
2017-02-26 19:25:02 +01:00
Zaven Muradyan b59ac96b51 Require arguments to beforeEach, it, etc, to be actual functions 2016-12-27 23:53:35 -08:00
Gregg Van Hove da2005fe97 Merge branch 'beforeall-in-xdescribe' of https://github.com/voithos/jasmine into voithos-beforeall-in-xdescribe
- Merges #1225 from @voithos
- Fixes #1175
2016-12-02 09:56:36 -08:00
Gregg Van Hove 5a76e59d5b Merge branch 'spyOnProperty2' of https://github.com/celluj34/jasmine into celluj34-spyOnProperty2
- Merges #1203 from @celluj34
- Merges #1008 from @smacker
- Fixes #943
2016-11-04 14:36:56 -07:00
Zaven Muradyan c21bdaf35d Fix bug where before/afterAll were being executed in disabled suites. 2016-10-23 20:40:58 -07:00
Gregg Van Hove 17c89c69d6 Separate clear stack and run it after each spec
[finishes #50197985][fix #109418332]
- Fixes #985
- Fixes #945
- Fixes #366
2016-10-14 09:21:49 -07:00
Gregg Van Hove 04bb56a5b5 Allow currently registered reporters to be cleared
- jasmine/jasmine-npm#88
2016-09-16 16:02:08 -07:00
Henry Blyth 8e23c26383 Make spyOnProperty available in tests
Needed adding to the env and require interface
2016-09-12 18:22:58 -05:00