Julian Lannigan
7ac1244f58
changed tests to work in environments that dont support async/await
2017-11-10 10:17:48 -05:00
Julian Lannigan
2be5e0a962
Allowed async functions to be passed into spy#callFake
2017-11-09 19:59:23 -05:00
Gregg Van Hove
4e47b78f1f
Use isFunction to check for functionness in callFake
...
- Fixes #1191
2016-09-14 16:06:44 -07:00
Andrzej Kopeć
bbf3f6825c
Improve error message when passing a non-function to callFake
2016-02-28 21:37:28 +01:00
Gregg Van Hove
79206ccff5
Rename j$ to jasmineUnderTest for specs
...
- Clarifies what it is for when writing tests
- No longer named the same as the `jasmine` that is injected into live
code
2015-12-03 17:23:32 -08:00
Mridul
709e032d1c
Added returnValues functionality to spy strategy
2014-09-13 12:41:20 +10:00
Gregg Van Hove and Tim Jarratt
1c19b8e38a
Move spec files back out of spec/javascripts
...
- Jasmine gem allows us to specify a path to jasmine.yml via ENV
[finish #58126010 ]
2013-10-02 16:32:35 -07:00
Gregg Van Hove and Rajan Agaskar
5017d1a4f1
Make rake jasmine:ci run specs correctly.
...
- Will replace rake core_specs.
- Remove obsolete dependencies & files -- most of these were for build tasks we
are no longer using. Notably, rspec and spec_helper were deleted.
2013-09-25 10:11:02 -07:00
Sheel Choksi
4bff199c2a
Rename a spy's callReturn and callThrow
...
.and.callReturn is now .and.returnValue
.and.callThrow is now .and.throwError
[finishes #56281634 ]
2013-09-06 21:55:14 -07:00
Sheel Choksi
e3f0389ac2
Change andThrow to always throw an Error
...
If an error is passed in, it is thrown, otherwise the argument passed
in is wrapped in an Error
[finishes #50607615 ][closes #372 ]
2013-09-05 23:05:45 -07:00
Colin O'Byrne and JR Boyens
663a58d617
[Finishes #51528655 ] spies should support and.stub()
2013-07-22 14:39:06 -07:00
Davis W. Frank & Sheel Choksi
3847557bbc
Squashed spy refactor and new spy syntax
...
Jasmine spies now have a 'and' property which allows the user to
change the spy's execution strategy-- such as '.and.callReturn(4)'
and a 'calls' property which allows inspection of the calls a spy
has received.
* This is a breaking change *
There is a CallTracker that keeps track of all calls and arguments
and a SpyStrategy which determines what the spy should do when it
is called.
2013-07-22 14:29:52 -07:00