ivan baktsheev
fc3eb0fbd8
Handle node.js assert as an error in your specs
2019-09-23 16:47:07 -07:00
Steve Gravrock
68f25a758d
Don't create env instances in beforeEach
2019-09-11 13:31:01 -07:00
Steve Gravrock
65d9e93a88
Removed broken & long-disabled JsApiReporter integration specs
2019-09-10 09:38:38 -07:00
Steve Gravrock
2d3ac38df8
toBeRejectedWithError can expect the error to be Error, not just a subtype
2019-09-06 14:17:52 -07:00
Steve Gravrock
5a219da848
Added basic integration tests for all built-in matchers
2019-09-06 14:10:16 -07:00
Dmitriy T
7263a38c3f
Adds new configuration option to failSpecWithNoExpectations that will report specs without expectations as failures if enabled
2019-09-05 09:47:38 -07:00
Gregg Van Hove
e8870db8d3
Merge branch 'fix-missing-asynchronous-stacktrace' of https://github.com/prantlf/jasmine into prantlf-fix-missing-asynchronous-stacktrace
...
- Merges #1738 from @prantlf
- Fixes #1728
2019-09-04 17:42:07 -07:00
Steve Gravrock
35d15085e3
Show argument diffs in toHaveBeenCalledWith failure messages
...
* Fixes #1641
2019-09-03 17:18:07 -07:00
Steve Gravrock
8ad1dd163b
Merge branch 'arrayContaining-actuals-must-be-arrays' of https://github.com/divido/jasmine
...
* Merges #1746 from @divido
* Fixes #1745
2019-08-30 13:12:47 -07:00
Steve Gravrock
c42358c686
Fixed test failure on IE
2019-08-30 09:30:23 -07:00
Tony Brix
f77ee32c56
Add custom async matchers
2019-08-30 09:30:14 -07:00
David Diederich
0bd636b5d2
Updated arrayContaining to require actual values to be arrays
...
If the actual value of a test was a string, this was matching against arrays
that contained the strings. This was due to the use of the contains matcher,
which against string looks for substrings, when it was intended to look for
array elements.
2019-08-30 01:09:53 -04:00
Pivotal
008b80adc5
Merge branch 'enelson/default' of https://github.com/elliot-nelson/jasmine
...
* Merges #1716 from @elliot-nelson
2019-08-29 13:50:27 -07:00
Steve Gravrock
1a63ab4677
Accept configurations with Promise: undefined.
...
Fixes Karma and anything else that uses Env#configuration
as a starting point for a Jasmine config.
2019-08-26 15:45:13 -07:00
Ferdinand Prantl
3a7fc63879
Pick the error instance to pass to error handlers in QueueRunner
...
The first number is the error message in HTML5 browser, which does not include
the call stack. The error instance allows logging the complete call stack in
reporters.
2019-08-11 09:32:31 +02:00
Ferdinand Prantl
527619b0aa
Restore the original global error hanler to pass all parameters along
2019-08-11 09:31:43 +02:00
Gregg Van Hove
0449b35f5a
Merge branch 'tobe-tostring' of https://github.com/johnjbarton/jasmine into johnjbarton-tobe-tostring
...
- Merges #1718 from @johnjbarton
- Fixes #1726
2019-08-07 12:03:46 -07:00
Olga Kozlova
b01d86840a
mapContaining and setContaining asymmetric matchers
2019-08-03 22:14:48 +03:00
Steve Gravrock
18195a868c
Updated async timeout message
...
There are now multiple ways to do async functions, and callbacks
are probably the least common in new code, so the message should
be more general rather than referring to callbacks.
2019-08-03 08:25:57 -07:00
Ferdinand Prantl
4858a62fdc
Add a unit test for the global error handling including stacktrace
2019-07-16 12:00:09 +02:00
Steve Gravrock
c100bb6242
Made output of toHaveBeenCalledWith more readable
...
This breaks each call out onto its own line, so that it's much easier to
see where each call starts and how they differ. E.g. previously the output
would be:
Expected spy foo to have been called with [ 'bar', 'baz', 'qux' ] but actual calls were [ [ 42, 'wibble' ], [ 'bar' 'qux' ], [ 'grault '] ]
Now it's:
Expected spy foo to have been called with:
[ 'bar', 'baz', 'qux' ]
but actual calls were:
[ 42, 'wibble' ],
[ 'bar' 'qux' ],
[ 'grault '].
2019-07-13 10:37:05 -07:00
johnjbarton
6324fda065
PrettyPrinter survives if objects throw in toString
2019-06-27 10:35:59 -07:00
Elliot Nelson
65e6df55ee
Linting fixes
2019-06-20 07:34:31 -04:00
Elliot Nelson
45475f6d1e
Allow users to pass property names to createSpyObj
2019-06-20 07:33:10 -04:00
Elliot Nelson
96786c793f
Allow users to set a default spy strategy
2019-06-07 23:32:13 -04:00
Gregg Van Hove
8af669677a
Cleanup spy promise strategies to be more consistent with Jasmine at large
...
- Rename `resolveWith` to `resolveTo` to match `toBeResolvedTo`
- No longer wrap non-Errors in `rejectWith`
- Fixes #1715
2019-05-23 17:29:12 -07:00
Gregg Van Hove
b4cbe9850f
add prettier and eslint
2019-05-21 18:23:48 -07:00
Gregg Van Hove
9f875ce666
Older versions don't support const, use var
2019-05-20 17:56:27 -07:00
Gregg Van Hove
df6a71e37d
Merge branch 'spy-to-string' of https://github.com/johnjbarton/jasmine into johnjbarton-spy-to-string
...
- Merges #1712 from @johnjbarton
2019-05-20 17:22:05 -07:00
Gregg Van Hove
cbbdd360f8
Merge branch 'enelson/pp' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/pp
...
- Merges #1711 from @elliot-nelson
- Closes #1700
- Closes #1575
2019-05-20 17:13:41 -07:00
johnjbarton
d1adbdc72b
fix(PrettyPrint): jasmine.createSpyObj('obj', ['toString']);
...
The PrettyPrint handler for scalars uses toString() but if that method
has been spyed on, then the stringify fails with
TypeError: Cannot read property 'length' of undefined.
By hanlding this case earlier in format() we avoid the error.
Add unit test covering this case.
2019-05-20 09:33:47 -07:00
Elliot Nelson
8225bb935f
Explicitly test pretty printing objects with nested invalid toString
2019-05-20 09:09:07 -04:00
Elliot Nelson
9f704b6f3a
PrettyPrinter handles objects with invalid toString implementations
2019-05-20 09:01:10 -04:00
Paul van Brenk
69a7449e50
Fix toBeCloseTo matcher for Node.js 12 and Chrome 74
2019-05-19 12:46:32 -04:00
Gregg Van Hove
309e6df8fd
Use Object.create to make an object with null prototype
2019-05-17 16:31:15 -07:00
Gregg Van Hove
ea1bac5b74
Merge branch 'enelson/spyonproperty' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spyonproperty
...
- Merges #1705 from @elliot-nelson
2019-05-17 16:21:17 -07:00
Elliot Nelson
1e13039478
spyOnProperty respects the allowRespy flag
2019-05-17 11:43:22 -04:00
Gregg Van Hove
11b0d95a7d
Merge branch 'enelson/toBeInstanceOf' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/toBeInstanceOf
...
- Merges #1697 from @elliot-nelson
2019-05-16 17:35:09 -07:00
Elliot Nelson
0fded24d35
Introduce matchers#toBeInstanceOf
2019-05-15 11:51:46 -04:00
Elliot Nelson
ee15309a8f
Extend spyOnAllFunctions to include prototype and parent methods
2019-05-11 18:20:13 -04:00
Gregg Van Hove
9a18fdca27
Merge branch 'enelson/spystrategies' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spystrategies
...
- Merges #1688 from @enelson
- See #1590
2019-05-09 17:30:45 -07:00
Elliot Nelson
b2fb92eedd
Promise-based strategies are now named resolveWith and rejectWith
2019-05-09 06:12:06 -04:00
Elliot Nelson
df818f3fbc
rejectValue wraps non-Errors like throwError does
2019-05-08 09:36:12 -04:00
Elliot Nelson
4731b4ee4d
Keep all Promise implementation details internal
2019-05-08 09:13:41 -04:00
Elliot Nelson
95e1890e64
Improved resolveValue/rejectValue error messages
2019-05-07 16:30:48 -04:00
Elliot Nelson
72aa0bbe4d
Add resolveValue and rejectValue spy strategies
2019-05-05 08:08:34 -04:00
Alexey Prokhorov
8ab46566ac
Fix failure messages for toBeRejectedWithError matcher
2019-05-03 09:37:11 +04:00
Alexey Prokhorov
35968e4a60
Add toBeRejectedWithError matcher
2019-04-26 01:46:56 +04:00
Gregg Van Hove
2fbeb201bc
Fix failure messages for positive/negative infinity matchers
...
- Fixes #1674
2019-04-16 17:40:07 -07:00
Gregg Van Hove
b994a17039
Merge branch 'FelixRilling-boolean-matcher'
...
- Merges #1679 from @FelixRilling
2019-04-15 17:48:49 -07:00