Sheel Choksi
ab0b2b783c
Move next spec/next suite ids into closure
...
No longer exposing these from the environment
2013-10-24 13:43:04 -07:00
Sheel Choksi
a309117758
Remove TODO: should be easier to load polyfill for timeout functions as Jasmine does not get references to these functions until boot.js is loaded
2013-10-24 11:58:21 -07:00
Sheel Choksi
0c6e590a93
A spec without expectations is considered passing
...
- Specs are passing by default unless told otherwise
- Getting the result.status of a spec before the spec has run is now
undefined instead of pending
[finishes #59422744 ]
2013-10-24 11:34:42 -07:00
Sheel Choksi
39d7ebf28e
Remove an extra layer of wrapping for matchers/custom matchers
...
Helps reduce how nested custom matchers have to be for users as well as
Jasmine internal matchers
[#59161378 ]
2013-10-20 22:21:56 -07:00
Sheel Choksi
5f429fcb37
Re-enable CustomMatchersSpec and update for current version of custom matchers
2013-10-20 21:58:16 -07:00
Sheel Choksi
fdb7df812c
Improve error message when a spec doesn't call the async callback within the default time interval
2013-10-19 21:18:06 -07:00
Davis W. Frank
81299860aa
Merge pull request #450 from slackersoft/manualClockUninstall
...
Env no longer automatically uninstalls the clock after each spec
2013-10-18 15:51:10 -07:00
slackersoft
ca6fa6f711
Env no longer automatically uninstalls the clock after each spec
...
- Behaves more like how we want plugins to behave
[#58281436 ]
2013-10-16 18:39:03 -07:00
Davis W. Frank
8ca8197b4c
Make exposure of addMatchers and addCustomEqualityTesters be on jasmine instead of inconsistent.
2013-10-10 11:32:21 -07:00
slackersoft
6641d64305
Make addCustomEqualityTester available on jasmine global
...
- User shouldn't have to `jasmine.getEnv()` to add one
[#54582648 ]
2013-10-06 11:32:38 -07:00
Gregg Van Hove and Tim Jarratt
af4bfa8bc4
Env should use the "public" QueueRunner interface
2013-10-04 17:04:22 -07:00
Gregg Van Hove and Tim Jarratt
7e071547f5
Custom matchers fail to behave as expected
...
If they return false, that should be respected.
Submitted via @tjgrathwell
[Finish #58184156 ]
close #434
2013-10-03 15:13:27 -07:00
Davis W. Frank
0c4113e167
Quick fix - Spec needs j$ at execute time
2013-10-02 22:45:33 -07:00
Gregg Van Hove and Tim Jarratt
cb8ba74937
Don't add periods to the full name of a spec
...
- Breaks links for spec filters
- Looks strange if users add their own
[fix #58043244 ] fix #427
2013-10-01 16:28:33 -07:00
Sheel Choksi
da33c7823e
Add missing var in front of j$ to avoid polluting global namespace
...
Users should only have 'jasmine' in global namespace, j$ should be
fully internal unless developing for jasmine
As brought up by Morten Maxild
2013-09-29 14:46:55 -07:00
Sheel Choksi
efc384c6d6
Allow Env to take optional spec/suite ids when asked to execute
2013-09-17 19:55:49 -07:00
Sheel Choksi
d60786a06c
More clearly differentiate between spec and suite ids
2013-09-17 19:55:48 -07:00
Sheel Choksi
8ac085c103
Use jasmine.DEFAULT_TIMEOUT_INTERVAL for async timeout
...
Allows a user to specify their desired timeout interval for async specs
and change it on a per spec basis (for particularly slow specs, for example).
As pointed out by @Eric-Wright in #422 . [finishes #55996798 ]
2013-09-08 21:41:45 -07:00
Sheel Choksi
03dfea967c
Remove unused jasmine.DEFAULT_UPDATE_INTERVAL
2013-09-08 14:18:34 -07:00
Sheel Choksi
f463e1f7aa
Consistent 'this' between befores/it/afters
...
Change the 'this' user functions are called with to be an empty object
instead of the QueueRunner so that if the user puts properties on it,
they won't conflict.
Also, changes async specs to be called with a proper 'this', as pointed
out by @Eric-Wright in #419 and #420 .
[finishes #56030080 ]
2013-09-07 18:28:03 -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
Sheel Choksi
a442acb8aa
Mock Clock now correctly schedules delayed functions during a 'tick'
2013-09-02 18:50:17 -07:00
Davis W. Frank
ba55cb5e38
Mock clock now less intrusive, replacing global timer funcions only when clock is installed. [ Fixes #54168708 ]
2013-08-27 22:46:01 -07:00
Sheel Choksi
5ba6e51e1c
Restore custom failure messages for toHaveBeenCalledWith
...
As pointed out by @tjgrathwell
2013-08-26 23:24:43 -07:00
Sheel Choksi
0f42f2709a
Update PrettyPrinter to better check for an Object
...
Includes test case to fix FF as suggested by @ondras
Fixes #409
2013-08-03 11:49:20 -07:00
Davis W. Frank and Sheel Choksi
66d9b3d690
Moving call depth down to a lower number to increase CI stability at the expense of performance.
2013-07-28 17:01:49 -07:00
JR Boyens
edd7e3932b
Newer Firefoxen dislike large callback depths; tweak down to keep maximum recursion errors at bay
2013-07-26 17:26:17 -07:00
JR Boyens
0420e295f4
Resolve node issues
2013-07-26 16:44:48 -07:00
JR Boyens
98fa58ee49
Async timeout support
2013-07-26 11:27:40 -07:00
Colin O'Byrne and JR Boyens
984074ec95
small QueueRunner refactors
2013-07-24 17:38:26 -07:00
Colin O'Byrne and JR Boyens
6bb8a91301
inline the specConstructor
2013-07-24 15:20:15 -07:00
Colin O'Byrne and JR Boyens
051f3499ec
Revert "[Finishes #45476285 ] Add timeout support to async tests"
...
This reverts commit 8f5d0beb8c .
Async timeout support is just not ready for prime time.
2013-07-24 14:39:06 -07:00
Colin O'Byrne and JR Boyens
8f5d0beb8c
[Finishes #45476285 ] Add timeout support to async tests
2013-07-23 17:07:02 -07:00
Colin O'Byrne and JR Boyens
9609aba25f
[Finishes #52959947 ] Warn user about spy conflicts; Refactor spy tests to more reflect responsibilities and removed duplicate tests
2013-07-23 17:00:30 -07:00
Colin O'Byrne and JR Boyens
30aec66ce5
[Finishes #14177231 ] copy properties onto spy
2013-07-22 14:54:43 -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
Greg Cobb and JR Boyens
8c1881053c
Resolve remaining test issues
2013-07-22 11:57:47 -07:00
Sheel Choksi
61a1f93488
Older IE fixes
...
Still not green, but getting close. Summary of Older IE discrepancies:
- Older IE doesn't have apply/call on the timing functions
- Older IE doesn't allow applying falsy arguments
- Older IE doesn't allow setting onclick to undefined values
- Older IE doesn't have text property on dom nodes
2013-07-21 19:44:47 -07:00
Sheel Choksi
04ac41d911
Fix phantomjs by using fnNameFor
...
Phantomjs's execptions toString include a ': ' at the end, so instead
use the exception's name property
2013-07-21 15:34:44 -07:00
Davis W. Frank
44feee57ac
Merge pull request #394 from albertandrejev/ObjectContaing-message
...
ObjectContaining wrong filed value error message
2013-07-21 10:30:45 -07:00
Davis W. Frank
fc3d08bf40
Merge pull request #397 from valera-rozuvan/remove_unnecessary_parameter_to_function_call
...
Removed unnecessary parameter from suiteFactory() call.
2013-07-21 07:41:22 -07:00
JR Boyens
03ffe5ce6a
DRY up some sopping wet code
2013-07-19 18:51:05 -07:00
Greg Cobb and JR Boyens
1b0b4f22a0
Fix IE10
2013-07-19 17:34:04 -07:00
Greg Cobb and JR Boyens
3e2d9baec2
[Finishes #40853563 ] Allowed the DelayedFunctionScheduler to support strings that are eval'd
2013-07-18 13:57:51 -07:00
Sheel Choksi
c91df21a96
Detailed error messages in toThrow/toThrowError
...
- included what was thrown for failure messages in toThrow and toThrowError
- fixed typo from 'execption' to 'exception' in toThrowError failure messages
- clarified failure messages in toThrowError to include specific error types
[Fixes #52680709 ]
2013-07-12 23:24:50 -07:00
Sheel Choksi
aabf8cec82
Specs/Suites wait for an async spec to finish
...
Go back to having all suites and specs run asynchronously so that
they properly wait for any async specs that there might be
2013-07-10 20:52:18 -07:00
Sheel Choksi
ec7d58fce0
QueueRunner continues running functions in async case
...
Continue running functions even if an async spec throws an
exception during the synchronous portion of the spec
2013-07-07 21:56:26 -07:00
Davis W. Frank and Sheel Choksi
7f6b16ccf2
Only clear stack when QueueRunner is done with its functions
2013-07-03 15:20:45 -07:00