Commit Graph

1720 Commits

Author SHA1 Message Date
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
Steve Gravrock bd41a97cd5 Merge branch 'anysymbol-fix' of https://github.com/voithos/jasmine
- Merge #1435 from @voithos
2017-10-24 08:18:42 -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 03f7f76bca Removed Safari 6 from the test matrix
Sauce Labs no longer supports Safari <7.
2017-10-23 12:05:52 -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
Gregg Van Hove 8973e4e44f Ignore package-lock.json
We want to make sure that Travis checks against the latest version of
our dependencies, and also maintain compatibility across multiple
versions of Node.

Signed-off-by: Steve Gravrock <sgravrock@pivotal.io>
2017-10-23 11:53:48 -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
Steve Gravrock 6c363f11b3 Merge branch 'lintfix' of https://github.com/voithos/jasmine
- Merges #1428 from @voithos
2017-10-23 11:01:18 -07:00
sgravrock 0f650e1d03 Merge pull request #1429 from voithos/docfix
Fix "Before Committing" section of CONTRIBUTING.md.
2017-10-23 10:46:06 -07:00
Zaven Muradyan 78fe42ac2d Fix "Before Committing" section of CONTRIBUTING.md.
The old contributing docs had a misaligned nested unordered-list, which
resulted in it creating a new list instead of being nested under its
parent.

It also seems like it would be useful to have the "revert your changes"
prose as part of the "Before Committing" section, since otherwise people
may miss it and have to amend.
2017-10-15 22:48:57 -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
Michael Leaney 516e00d7ba Fix #1426 clearTimeout not correctly clearing a timeout
clearTimeout was not correctly handling the case of clearing a
timeout that is also scheduled to run at the same tick.

This fix adds a deletedKeys array that is checked whilst we are
running the scheduled functions for the current clock tick. If
a function exists in deletedKeys it will not be ran. deletedKeys
is then reset to an empty array.
2017-10-11 20:54:56 +08:00
Michael Leaney c1957ecd7c Add test 2017-10-11 20:29:27 +08: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
Gregg Van Hove 8cf8736cab bump version to 2.8.0 v2.8.0 2017-08-24 11:41:41 -07:00
Gregg Van Hove 6d0f0ed915 Only use the extra setTimeout outside of IE8. 2017-08-10 16:38:13 -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
ksvitkovsky da2673e02f Test nested methods to throw an error 2017-08-10 22:05:13 +04:00
Gregg Van Hove b2dee5cb1c Create CODE_OF_CONDUCT.md 2017-08-10 10:38:05 -07: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 2588b442e6 Integration specs that actually execute a suite need to be async 2017-08-09 11:51:26 -07:00
Gregg Van Hove af41e5ea5c Properly wait until test env has completed before moving on. 2017-08-09 11:43:55 -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
Gregg Van Hove 301dd4f6b5 Merge branch 'kiewic-kiewic/toEqualArrayDiff'
- Closes #1375 from @kiewic
2017-08-08 09:55:32 -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
Gregg Van Hove 8c0a8a1b33 Merge branch 'ksvitkovsky-github-1388'
- Closes #1408 from @ksvitkovsky
- Fixes #1388
2017-08-04 10:27:55 -07:00
ksvitkovsky 1db81c334d Ensure no message added on asym. match success 2017-08-04 10:26:51 -07:00
Gregg Van Hove 8dd0ad531c Merge branch 'ksvitkovsky-github-1403'
- Closes #1407 from @ksvitkovsky
- Fixes #1403
2017-08-04 09:55:09 -07:00
ksvitkovsky f58002f0a6 Better primitives detection for saveArgsByValue 2017-08-04 09:40:42 -07:00
Gregg Van Hove 4d18e63b0f Merge branch 'ksvitkovsky-github-1180'
- Closes #1404 from @ksvitkovsky
- Fixes #1180
2017-08-04 09:34:16 -07:00
ksvitkovsky 4fc177d5ae Better pretty printing for typed arrays 2017-08-04 09:33:05 -07:00
Gregg Van Hove acc8c23bf4 Merge branch 'theefer-fix-map+set-comparison'
- Merges #1406 from @theefer
- Fixes #1402
2017-08-04 09:23:31 -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 b256741bec bump version to 2.7.0 v2.7.0 2017-07-27 17:47:20 -07: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
Gregg Van Hove 543e056056 Merge branch 'jberney-master'
- Merges #1399 from @jberney
2017-07-24 17:13:21 -07:00
Jonathan 7dfc5f506c Send unfocused tests through the same queue as focused tests 2017-07-23 09:01:15 -07:00
Gregg Van Hove 4cce7263c4 Update github issue and PR templates 2017-07-22 09:34:58 -07:00
Gregg Van Hove 31164106e5 Get the casing right for IE8 2017-07-18 21:51:32 -07:00
Gregg Van Hove f71218a44b Allow IE8 to be weird when pretty printing 2017-07-18 21:07:38 -07:00