Commit Graph

1330 Commits

Author SHA1 Message Date
Steve Gravrock b943f6b736 Fixed SPEC HAS NO EXPECTATIONS warning in HTML reporter
[Finishes #153891435]
2017-12-23 11:14:37 -08:00
Steve Gravrock b439e2fb37 Extracted results state management out of the HTML reporter
[#153891435]
2017-12-23 11:12:38 -08:00
Chris Young 62b815c485 Use timeout objects when in node
Fixes: https://github.com/jasmine/jasmine/issues/1469
2017-12-21 10:51:07 -08:00
Steve Gravrock 65b4499dec In Jasmine's own tests, don't leak between jasmine and jasmineUnderTest 2017-12-20 12:08:22 -08:00
Steve Gravrock d742ada71d Added links to re-run the suites containing a failing spec
[Finishes #25508053]
2017-12-19 11:29:18 -08:00
Steve Gravrock b6cc34d9e9 Correctly remove spies of window.onerror on IE 2017-12-18 16:34:37 -08:00
Steve Gravrock ef9f82a17d Merge branch 'master' into 3.0-features 2017-12-18 09:48:17 -08:00
Steve Gravrock d3a3cf1ff3 Collapsed StringPrettyPrinter into PrettyPrinter
We never really took advantage of the potential extensibility that the
split provided, and the boundary between the two was getting muddied
over time.
2017-12-18 09:43:25 -08:00
Steve Gravrock c0d0513199 Stop serializing objects after hitting jasmine.MAX_PRETTY_PRINT_CHARS 2017-12-15 13:23:59 -08:00
Steve Gravrock 86a38fceb9 Truncate pretty printer output that is more than j$.MAX_PRETTY_PRINT_CHARS long 2017-12-13 08:09:22 -08:00
Steve Gravrock c74af1d900 Reduced pretty printer limits to much smaller values
This should help prevent out of memory errors when printing large object
graphs. See #1291 and #1422.

[#153257532]
2017-12-13 08:07:43 -08:00
Steve Gravrock bb0992bf5f Added a toHaveClass matcher
[#153567695]
2017-12-11 15:59:59 -08:00
Steve Gravrock ac5d8708b9 More informative pretty-printing of DOM elements
[Finishes ##153562618]
2017-12-11 08:25:13 -08:00
Steve Gravrock eb93d38294 Allow jasmine-npm to handle its own load errors
[Fixes #153466462]
2017-12-08 09:17:10 -08:00
sjolicoeur d90e20eb15 Added matchers: truthy, falsy, empty and notEmpty 2017-12-07 17:49:16 -08:00
Steve Gravrock 2200dd084d Fixed build 2017-12-01 08:34:12 -08:00
Gregg Van Hove 21655a82c9 Use prototype for spy strategy for better memory management
- Also convert `identity` to a property from a method
2017-11-30 17:30:20 -08:00
Steve Gravrock f4caf27208 Fixed pending() for async/promise-returning specs
Fixes #1449.
Fixes #1450.
2017-11-29 08:57:29 -08:00
Steve Gravrock a63172f53f expect(null).toEqual(jasmine.any(Object)) no longer passes
[Finishes #153181443]
Fixes #1255.
2017-11-29 08:10:01 -08:00
Steve Gravrock 9619acf91f Extracted the predicate version of toThrowError into its own matcher
This simplifies the signature of each matcher to something that jsdoc
can actually handle.

[Finishes #20622765]
2017-11-28 14:30:06 -08:00
Steve Gravrock db615e4186 Determine overall status in core, not reporters
[#92261606]
[#78679648]
2017-11-17 14:24:12 -08:00
Steve Gravrock 5906a2c05c Filter Jasmine frames from stack traces
[Finishes #2644992]
2017-11-13 15:49:01 -08:00
Steve Gravrock b0ec95c472 Merge branch 'master' into 3.0-features 2017-11-10 10:26:14 -08:00
Julian Lannigan 2be5e0a962 Allowed async functions to be passed into spy#callFake 2017-11-09 19:59:23 -05: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 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 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 324ad0073e Refactored toThrowMatching to facilitate adding more strategies
* Extracted sub-matchers for the two major existing strategies
  (matching all errors, and matching by type and/or message)
* Reduced the use of mutable state
2017-10-30 08:51:25 -07:00
Steve Gravrock 9f7a6ef061 Check truthiness of toThrowError args, not arg count
This enables some useful simplifications at the cost of making it
impossible (for now) to expect a function to throw an error with a falsy
message.

[#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
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
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
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