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
fc258b3d36
Make it easy to copy the title of failing specs
...
[finish #58121820 ]
2013-10-02 15:14:41 -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
66010d01ec
Give reporting symbols a little bit more height
...
Ensures they don't appear cut off when in the last row
2013-09-16 21:05:24 -07:00
Travis Grathwell
79a75f5bdb
HTMLReporter symbols are inline-block rather than floated
...
On a very large test suite (8000 specs), a significant amount
of time is spent just drawing the spec dots. Some sort of
worse-than-linear artifact that summons itself only when you
have 8000 floated elements trying to hang out together.
This performance penalty is not seen with inline-block.
In Chrome 29:
Floated dots: 16.795s
Inline-block dots: 2.774s
Setting the dots to 'display: none;' takes about the same time
as the inline-block figure, so this is probably a low enough bound
(no need for chunked rendering or who knows what).
2013-09-10 19:46:51 -07:00
Sheel Choksi
7158e048a6
Update Jasmine CSS build process
...
- Update compass configuration to build jasmine.scss into lib
- Remove src/html/jasmine.css (since jasmine.scss builds directly into
lib now)
- Bump lib/jasmine-core/jasmine.css to be latest from scss
2013-09-09 21:41:24 -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
00f88edc04
[Finishes #52731407 ] Escape special regex characters from the spec param
2013-07-26 11:28:15 -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
2d7fe0b6ce
Merge pull request #388 from sheelc/html_self_test
...
Have Jasmine HTML use the source files in specs
2013-07-21 10:33:26 -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
f68657f14e
Have Jasmine HTML use the source files in specs
...
Similar to the changes in Jasmine core and console, this gets the
HTML specs of Jasmine using j$ instead of jasmine so that they use
the source files instead of the built distribution
2013-07-13 23:36:29 -07:00