Commit Graph

19 Commits

Author SHA1 Message Date
Elliot Nelson ee15309a8f Extend spyOnAllFunctions to include prototype and parent methods 2019-05-11 18:20:13 -04:00
Andrew Eisenberg f62eb3b1a8 Add spyOnAllFunctions function
This function will spy on all writable and configurable functionss of
an object that is passed in. It can be used like this:

    spyOnAllFunctions(obj);

This commit addresses https://github.com/jasmine/jasmine/issues/1421
2018-07-20 07:58:17 -07:00
Gregg Van Hove 414e03bded Setup createSpy in all specs where needed and finish renaming params
Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-22 14:21:52 -08:00
Gregg Van Hove 038ab87252 Merge branch 'custom-spy-strategy' into 3.0-features 2018-01-22 12:12:59 -08:00
Steve Gravrock cf2f922e30 Merge branch 'master' into 3.0-features 2018-01-10 15:28:55 -08:00
Steve Gravrock 6f119c4e5a Moved createSpy to env so it can be stateful 2018-01-09 10:16:02 -08:00
Steve Gravrock b6cc34d9e9 Correctly remove spies of window.onerror on IE 2017-12-18 16:34:37 -08:00
Steve Gravrock 419470e9df Removed support for IE <10
[#150527985]
2017-11-08 08:30:22 -08:00
Gregg Van Hove 9fbd0ba551 Nicer error messages for spyOn when null is provided
Fixes #1258
2017-02-15 15:55:27 -08:00
Sukharev Maxim 56191cfb2e Implement spies for get/set functions on accessor properties 2016-09-12 18:22:58 -05:00
Sean Parmelee 8676bbf11a fallback on assignment when a spy cannot be deleted 2016-09-01 13:39:25 -05:00
Gregg Van Hove b66ffc1277 Merge branch 'spy-inherited-methods' of https://github.com/benchristel/jasmine into benchristel-spy-inherited-methods
- Merges #1036
- Fixes #737
2016-02-22 14:11:00 -08:00
Ben Christel d6f1f8dec5 Correctly teardown spies on inherited methods
- If the spied method is not an own property of the object being spied
  upon, the method is deleted from the object on teardown instead of
  being set to the original implementation.

- #737
2016-02-01 17:45:47 -08:00
DJ Burrowes 65241565c5 Reverse order that spies are cleared up.
Fixes #1010
2016-01-03 19:14:57 -08: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
Gregg Van Hove ea4c44904d IE 8 doesn't support defineProperty on non-DOM nodes, skip that kindof thing 2015-10-26 17:41:30 -07:00
Stephan Bijzitter a81466d9e7 Abort spying when the target cannot be spied on 2015-10-21 12:44:52 +02:00
slackersoft b4b3ac25a1 spyOn explicitly checks to see that a method name to spy on was passed.
[finish #27689237]
2014-12-16 13:21:48 -08:00
Christopher Amavisca, Greg Cobb and Sheel Choksi 752a36d3ff Manage spys/matchers/custom equalities for beforeAll
- Refactor expectations to take list of matchers
- Add spyRegistry to manage runnables' spies
- Add clone util

[#66789174]
2014-03-05 10:28:37 -08:00