Commit Graph

1030 Commits

Author SHA1 Message Date
Steve Gravrock a42f28c734 Removed checks for PhantomJS 1
v2 has been out for a long time, and v1 can no longer be easily installed.
2017-11-09 07:04:06 -08:00
Steve Gravrock aaf226b9e3 Removed spec guards for versions of Safari we no longer support 2017-11-08 08:30:35 -08:00
Steve Gravrock 419470e9df Removed support for IE <10
[#150527985]
2017-11-08 08:30:22 -08:00
Steve Gravrock 1526d5e2a8 Treat afterAll errors at any level as failures
[Finishes #152492514]
2017-11-07 20:48:23 -08:00
Steve Gravrock a3cb010971 Removed remaining traces of the obsolete console reporter
[#80410262]
2017-11-07 20:09:04 -08:00
Steve Gravrock 278ef9228b Removed obsolete console reporter from core
Anyone who was still using this should use the one in jasmine-npm
instead.

[Finishes #80410262]
2017-11-07 12:25:47 -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 ae9b95269c Load error handling doesn't depend on browser features, so test it everywher
[#24901981]
2017-11-02 18:17:40 -07:00
Steve Gravrock 285f06d5c4 Merge branch 'promise-matching-1314' of https://github.com/sderickson/jasmine 2017-11-02 17:18:24 -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 7b8edcb401 HTML reporter reports overall failure if there are any global errors
[#24901981]
2017-11-01 11:44:58 -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
Benjamin Mularczyk b4dfdd7a48 Fix equality computation for ES6 Sets. 2017-11-01 01:01:26 +01:00
Steve Gravrock 12ed3bfacd Allow use of a predicate function to validate thrown exceptions
[Finishes #20622765]
2017-10-30 08:51:25 -07:00
Steve Gravrock e31db20ec7 Default to running tests in random order
[Finishes #109197518]
2017-10-27 08:50:40 -07:00
Zaven Muradyan 89306551a0 Add some unit tests that exercise jasmine.anything() and Map matching.
Follow-up to some recent commits that fixed issues around
jasmine.anything() matching. This simply adds some extra tests that
exercise usage of Symbols with jasmine.anything() and as Map keys.
2017-10-24 22:39:31 -07: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
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
Gregg Van Hove 6d0f0ed915 Only use the extra setTimeout outside of IE8. 2017-08-10 16:38:13 -07:00
ksvitkovsky da2673e02f Test nested methods to throw an error 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 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
ksvitkovsky e7049d3183 Add 'nothing' matcher and tests 2017-08-09 16:44:19 +04: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 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
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
Pierre Vanduynslager c604012793 Fix rounding in toBeCloseTo 2017-06-25 16:59:24 -04:00
Gregg Van Hove 6aa069d586 IE 8&9 use setTimeout to clearStack so mock clock gets tricky 2017-06-20 10:29:19 -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 de862f8133 Only clear out the spec param for Run all link
- Fixes #1369
2017-06-16 14:07:40 -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 2e737f50ca Don't use window 2017-06-15 14:32:18 -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