Commit Graph

901 Commits

Author SHA1 Message Date
Steve Gravrock b9adc76dc7 Clear the stack if onmessage is called before the previous invocation finishes 2017-05-16 14:08:58 -07:00
Steve Gravrock 9672689d40 Added support for ES2017 async functions 2017-05-12 14:42:14 -07:00
Steve Gravrock a237ac5386 Added support for async before/it/after functions that return promises 2017-05-11 14:31:09 -07:00
Gregg Van Hove 5ac3e21abb Merge branch 'interleaved-suites' of https://github.com/sgravrock/jasmine into sgravrock-interleaved-suites
- Merges #1352 from @sgravrock
- Fixes #1344
- Fixes #1349
2017-05-10 13:49:05 -07:00
Steve Gravrock 88763012e4 Unified async and async queueable function running code 2017-05-10 10:14:47 -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
Steve Gravrock 10f1220e55 Don't mask errors that occur when no handlers are installed
It's possible for async code to cause an error when Jasmine
doesn't have any listeners registered internally. This causes
Jasmine to crash (Node) or log to the console (browser)
because of trying to call the nonexistent handler. This change
doesn't fix the overall problem but it does ensure that the
original error is logged rather than Jasmine's internal error.
2017-05-08 11:09:32 -07:00
rmehlinger 5ee03f02ed Add ES6 map support to Jasmine 2017-05-01 00:12:48 -07:00
Gregg Van Hove 1d62504534 Check for process.listeners as well, for GlobalErrors
- Fixes #1333
2017-04-26 13:54:07 -07:00
Tony Brix d2b33e0c66 allow undefined as function 2017-04-26 13:49:13 -07:00
Tony Brix 686d8157e5 remove eval to create spy wrapper 2017-04-26 13:34:32 -07:00
Gregg Van Hove b771c083cb No longer try to use nextTick since node.js gets upset 2017-04-25 14:38:09 -07:00
Gregg Van Hove fbd2ffc08b Build distribution for keys lookup fix 2017-04-25 14:35:58 -07:00
Sean Parmelee 0d6ecbec17 iterate through keys with a regular for loop 2017-04-25 11:28:16 -05: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 7f11ecb62e Merge branch '1123-custom-error' of https://github.com/deckar01/jasmine into deckar01-1123-custom-error
- Merges #1298 from @deckar01
- Fixes #1123
2017-04-10 13:47:31 -07:00
Gary Borton 50880fcff7 [lifecycle hooks] Make afterAll hooks operate in the fashion as afterEach.
It was discovered that afterAll hooks run in the same order that you add them,
while afterEach hooks were running in reverse order.  This commit makes their
order consistent, and adds regression tests.

Relevant issue - https://github.com/jasmine/jasmine/issues/1311
2017-04-10 07:03:37 -07:00
Thodoris Bais 08f046c24c Added infinity methods, with tests 2017-03-27 00:04:43 +02:00
Jared Deckard c42b1972e2 Allow the matcher provide a custom error message 2017-03-24 14:12:33 -05: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 75e652d6a7 Cleanup toThrowError constructor lookup to work in older IE
- Also use the existing browser detection for phantom
2017-03-14 14:26:17 -07:00
Gregg Van Hove e1f7ca51da Merge branch 'issue-1252' of https://github.com/anseki/jasmine into anseki-issue-1252
- Merges #1275 from @anseki
- Fixes #1252
2017-03-10 14:36:22 -08:00
Gregg Van Hove 2ea41d3e27 Merge branch 'toHaveBeenCalledBefore' of https://github.com/foretagsplatsen/jasmine into foretagsplatsen-toHaveBeenCalledBefore
- Merges #1242 from @DamienCassou
2017-03-10 09:57:03 -08: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
Damien Cassou c93f35fbc8 fixup! Add toHaveBeenCalledBefore matcher 2017-02-20 10:55:23 +01:00
Damien Cassou 4cfdd06700 Add toHaveBeenCalledBefore matcher
This matcher makes sure the 'actual' spy is called before the
'expected' spy.

This code has been written in cooperation with Benjamin Van Ryseghem.
2017-02-20 09:52:14 +01:00
Gregg Van Hove 9fbd0ba551 Nicer error messages for spyOn when null is provided
Fixes #1258
2017-02-15 15:55:27 -08:00
anseki ed23254865 fix #1252 2017-02-10 17:17:39 +09: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 be6ff8b24c Remove unused message param from Suite#pend
- See #1132
2016-12-02 10:08:39 -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
Ben Christel 41a813521b Fix tests for toEqual diff output in IE
- Merges #1236 from @benchristel
2016-11-30 15:34:39 -08:00
Ben Christel d5e6bf47ed Make toEqual matcher report the difference between objects
- Mismatches deep within object/array structures are pinpointed with a JsonPath-like syntax.
2016-11-14 22:08:34 -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
Gregg Van Hove f5cfa2a4c1 Merge branch 'master' of https://github.com/d-reinhold/jasmine into d-reinhold-master
- Merges #1046 from @d-reinhold
- Fixes #510
2016-11-04 10:29:09 -07:00
Zaven Muradyan c21bdaf35d Fix bug where before/afterAll were being executed in disabled suites. 2016-10-23 20:40:58 -07:00
Pivotal 369e8cc08b Merge branch 'mockMethodsShortcut' of https://github.com/mbildner/jasmine into mbildner-mockMethodsShortcut
- Merges #1101 from @mbildner
2016-10-17 15:53:05 -07:00
Gregg Van Hove 0e9b9a11c3 Fix tests for new stack clearing in IE 2016-10-14 15:53:00 -07:00
Gregg Van Hove 2f01f64249 Build distribution for clear stack implemenation 2016-10-14 09:48:11 -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 0d1a9a72d9 Fix spy arity stuff to work in IE8 2016-09-28 11:49:07 -07:00
Gregg Van Hove c2e2bd7c91 Merge branch 'spy-arity-preservation' of https://github.com/kapke/jasmine into kapke-spy-arity-preservation
- Merges #1055 from @kapke
- Fixes #991
2016-09-27 15:42:45 -07:00
Gregg Van Hove 05097b3e42 Merge branch 'set-equality' of https://github.com/alur/jasmine into alur-set-equality
- Merges #1067 from @alur
2016-09-27 13:37:57 -07:00
Gregg Van Hove f4849f6401 Merge branch 'pretty-print-cross-frame-objects' of https://github.com/thatfulvioguy/jasmine into thatfulvioguy-pretty-print-cross-frame-objects
- Merges #1091 from @thatfulvioguy
- Fixes #1087
2016-09-27 11:40:01 -07:00
Gregg Van Hove ec2ae4d521 Merge branch 'custom-testers-in-asymmetric-matchers' of https://github.com/joeyparrish/jasmine into joeyparrish-custom-testers-in-asymmetric-matchers 2016-09-27 11:01:45 -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