Julian Lannigan
2be5e0a962
Allowed async functions to be passed into spy#callFake
2017-11-09 19:59:23 -05:00
Steve Gravrock
285f06d5c4
Merge branch 'promise-matching-1314' of https://github.com/sderickson/jasmine
2017-11-02 17:18:24 -07:00
Benjamin Mularczyk
b4dfdd7a48
Fix equality computation for ES6 Sets.
2017-11-01 01:01:26 +01:00
Steve Gravrock
da91294182
Merge branch 'anything-fix' of https://github.com/voithos/jasmine
...
- Merges #1436 from @voithos
2017-10-24 08:26:13 -07:00
Zaven Muradyan
6d3953356d
Add special handling of asymmetric matcher objects as keys in Maps.
...
The previous Map equality code was assuming that the set of keys would
be identical between the two Maps. This change adds insertion-order
tracking for each key with its corresponding key. If one of the two keys
is an asymmetric equality obj, the keys are eq()'d, and if it succeeds,
the corresponding values are compared. Otherwise, the "main" key is
looked up directly in the other object; this is to prevent
similar-looking obj keys with different obj identities from comparing
equal.
Fixes #1432 .
2017-10-23 23:01:50 -07:00
Zaven Muradyan
62f769767a
Add support for jasmine.any(Symbol).
...
The original asymmetric matcher code for Any did not work with symbols
since `symbolInstance instanceof Symbol` is actually `false` (but,
`symbolInstance.constructor` is `Symbol). This simply adds an extra
clause that explicitly checks for symbol (if available) like the other
primitive types.
Also added some missing specs for other types, like Map, Set, etc.
Fixes #1431 .
2017-10-23 20:07:56 -07:00
Steve Gravrock
4c6dadb9b1
Merge branch 'github-1295' of https://github.com/ksvitkovsky/jasmine
...
- Merges #1411 from @ksvitkovsky
2017-10-23 11:58:30 -07:00
Steve Gravrock
b7e9594c86
Merge branch 'jasmine-deep-clone-args' of https://github.com/aj-dev/jasmine
...
- Merges #1424 from @aj-dev
2017-10-23 11:32:58 -07:00
Zaven Muradyan
20d86b2a00
Fix lint warning in CallTracker.
...
The previous code was using `== null` to handle both `null` and
`undefined`, resulting in a jshint warning. The conditional is meant to
check for non-primitive values, and it happens to be the case that a
falsey value in JS is always a primitive, or `null` or `undefined`.
2017-10-15 12:31:54 -07:00
Audrius Jakumavicius
1f6c91de7c
Deep clone args before passing them to reporters
2017-10-07 01:32:39 +02:00
Gregg Van Hove
f6342ad4fe
Add a note about defineProperty for spyOnProperty
...
- Fixes #1415
2017-08-24 12:22:11 -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
1414281cff
Merge branch 'github-1221' of https://github.com/ksvitkovsky/jasmine into ksvitkovsky-github-1221
...
- Merges #1412 from @ksvitkovsky
- Fixes #1221
2017-08-09 17:20:54 -07:00
Gregg Van Hove
8834142198
Update jsApiReporter docs to link to new suite and spec results
2017-08-09 10:36:53 -07:00
Gregg Van Hove
1926fc11ae
Add jsdocs for reporter events
2017-08-09 10:21:59 -07:00
ksvitkovsky
e7049d3183
Add 'nothing' matcher and tests
2017-08-09 16:44:19 +04:00
Gregg Van Hove
80dba1138a
Add explicit docs for the callback function passed to it etc.
2017-08-08 17:28:36 -07:00
Gregg Van Hove
9811ff71d2
Update afterAll documentation
...
- See jasmine/jasmine.github.io#76
2017-08-08 14:37:45 -07:00
Gilberto Stankiewicz
090a6234c3
Make toEqual matcher report the difference between array elements when arrays have different length
2017-08-08 09:55:17 -07:00
Gregg Van Hove
8ad9abb19a
Add arrayWithExactContents asymmetric matcher
...
- Fixes #817
2017-08-04 12:07:09 -07:00
ksvitkovsky
1db81c334d
Ensure no message added on asym. match success
2017-08-04 10:26:51 -07:00
ksvitkovsky
f58002f0a6
Better primitives detection for saveArgsByValue
2017-08-04 09:40:42 -07:00
ksvitkovsky
4fc177d5ae
Better pretty printing for typed arrays
2017-08-04 09:33:05 -07:00
Sébastien Cevey
fc6ee243e9
Rewrite ES6 Set and Map comparison to ignore insertion order
2017-08-02 15:22:33 +01:00
Gregg Van Hove
1d4a2b5c22
Merge branch 'user-context' of https://github.com/darthjee/jasmine into darthjee-user-context
...
- Merges #1400 from @darthjee
2017-07-26 17:18:02 -07:00
darthjee
b0aac6b852
Add class UserContext
2017-07-26 23:40:22 +02:00
Jonathan
7dfc5f506c
Send unfocused tests through the same queue as focused tests
2017-07-23 09:01:15 -07:00
Gregg Van Hove
22e9d6df20
PrettyPrinter allows an object to have a toString that isn't a function
...
- Fixes #1389
2017-07-17 22:01:06 -07:00
Scott Erickson
6ddf64568e
Add Promise checking to eq
...
Fixes #1314
2017-06-26 19:10:19 -07:00
Alpha Chen
aa72b0b7cf
Simplified rounding code in toBeCloseTo
...
Signed-off-by: Steve Gravrock <sgravrock@pivotal.io >
2017-06-26 10:22:54 -07:00
Pierre Vanduynslager
c604012793
Fix rounding in toBeCloseTo
2017-06-25 16:59:24 -04: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
Steve Gravrock
9ee7b4ee0b
Don't setTimeout() every time the stack is cleared via MessageChannel()
2017-06-16 09:58:41 -07:00
Gregg Van Hove
c60d669940
Break into a setTimeout every once in a while
...
- Allows the CPU to run other things that used the real `setTimeout`
- Fixes #1327
- See #1334
- Fixes jasmine/gulp-jasmine-browser#48
2017-06-15 14:24:40 -07:00
Gregg Van Hove
4c491b2dc0
Pretty printer will now use MAX_PRETTY_PRINT_ARRAY_LENGTH for objects
...
- Fixes #1291
- Fixes #1360
2017-06-14 13:36:35 -07:00
Gregg Van Hove
1fe1bbb6ed
Merge branch 'master' of https://github.com/beatrichartz/jasmine into beatrichartz-master
...
- Merges #1362 from @beatrichartz
2017-06-07 14:16:48 -07:00
Gregg Van Hove
578f63b9bd
Make sure the queue runner goes async for async specs
...
- Even if `done` is called synchronously.
See #1327 #1334 jasmine/gulp-jasmine-browser#48
2017-06-06 14:29:02 -07:00
Beat Richartz
271908a2c4
Fail when one of the arguments passed into toBeCloseTo matcher is null
2017-06-02 15:36:39 +01: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
Gregg Van Hove
2ea4e9507c
Merge branch 'map-support' of https://github.com/rmehlinger/jasmine into rmehlinger-map-support
...
- Merges #1340 from @rmehlinger
- Fixes #1257
2017-05-19 14:19:14 -07:00
Gregg Van Hove
c848a66faa
Merge branch 'promises' of https://github.com/sgravrock/jasmine into sgravrock-promises
...
- Merges #1356 from @sgravrock
- Fixes #1336
- Fixes #1270
- Fixes #1350
- Fixes #1320
2017-05-19 14:03:21 -07:00
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