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
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
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
be0f7b4117
EnvSpec for timing out async spec fix
...
Spec still can't work for maximumSpecCallbackDepth = 1 until further
mock clock enhancements. Fixes the specs running twice issue caused by
the previous commit.
2013-09-02 21:48:44 -07:00
Sheel Choksi
edb46a6f7c
Fix spec in EnvSpec.js for specs that hang
...
This spec would hang when maximumSpecCallbackDepth was set to 1
[Fixes #54168730 ]
2013-09-02 20:39:37 -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
fc409f39a1
Workaround and bug exposure for IE8 and PrettyPrinter, which doesn't work well when trying to pretty print the native timer functions on IE. Make Jasmine's suite green and call out for a fix once we re-write the pretty printer. [Finishes #54168708 ]
2013-09-01 15:38:14 -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
JR Boyens
9e886b3972
Don't test for stack traces in Safari 5
2013-07-26 17:49:52 -07:00
JR Boyens
98fa58ee49
Async timeout support
2013-07-26 11:27:40 -07:00
Colin O'Byrne and JR Boyens
97ce396008
Build distribution; fix test in FF
2013-07-24 14:41:55 -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
Colin O'Byrne and JR Boyens
18c30566bd
Move from global to Env
2013-07-22 14:29:52 -07:00
Colin O'Byrne and JR Boyens
f2306729cd
Improve isIE check to allow us to check for a minimum version
2013-07-22 14:22:38 -07:00
Greg Cobb and JR Boyens
8c1881053c
Resolve remaining test issues
2013-07-22 11:57:47 -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
JR Boyens
990cc41f45
Remove debugger statement
2013-07-19 18:55:07 -07:00
Greg Cobb and JR Boyens
1b0b4f22a0
Fix IE10
2013-07-19 17:34:04 -07:00
Greg Cobb and JR Boyens
821f13dff5
Don't refer to window for the sake of Node specs
2013-07-18 13:59:25 -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
ccdcb293f4
Add back in forgotten 'env' to Env integration specs
...
As pointed out by @jdmarshall. Fixes #399
2013-07-07 21:56:26 -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
Sheel Choksi
34b8bf5fb0
Remove Env's calculation of executionTime
...
[#45659879 ]
2013-07-03 14:12:19 -07:00
Davis W. Frank and Sheel Choksi
179e54b9fb
Refactor suite timing out of Env and into each Reporter
...
[finishes #45659879 ]
2013-07-03 09:30:05 -07:00
Davis W. Frank and Sheel Choksi
09fe7b0540
Have QueueRunner run specs iteratively if possible, fallback to recursion for async specs
...
This prevents the stack from growing as large for the normal cases and is giving a significant speedup for the performance suite
2013-07-02 16:37:38 -07:00
Davis W. Frank and Sheel Choksi
dcf7a0867e
Test asynchronous parts of Jasmine asynchronously
2013-07-02 16:37:38 -07:00
Davis W. Frank and Sheel Choksi
f5bc9faf63
Rename for stack-clearing post spec run to be more clear; use the real setTimeout when clearing stack
2013-07-02 09:51:41 -07:00
Davis W. Frank
661a884416
Merge pull request #392 from albertandrejev/jasmine.Any
...
jasmine.any Boolean support
2013-06-21 10:07:35 -07:00
Albert Andrejev
7acc6b327a
ObjectContaining wrong filed value error message
2013-06-21 15:16:41 +03:00
Albert Andrejev
e40e0c9170
jasmine.any Boolean support
2013-06-21 15:07:55 +03:00
Davis W. Frank
7ae3fa9fef
Fixed some specs that were not referring to the correct instance of Jasmine
2013-06-10 22:45:04 -07:00
Sheel Choksi
ffdf1eb16d
Add execution time elapsed to JsApiReporter
...
Since this information is desired in ConsoleReporter, HtmlReporter,
and now JsApiReporter, the executionTime is passed through in
jasmineDone from Env instead of making each reporter compute it.
Fixes #30 , [Finishes #45659879 ]
2013-06-09 12:09:06 -07:00
Davis W. Frank
b6599d52aa
Merge pull request #358 from sheelc/safari_exception_fix
...
Fix spec to throw error, ensuring a stack property
2013-06-07 07:37:39 -07:00
Sheel Choksi
600be098af
Fix up my refactoring mistake in toThrowError
...
strengthen the associated tests to protect against it in the future
2013-06-04 19:49:11 -07:00
Sheel Choksi
7055d95584
Avoid instantiating passed in errorType in toThrowError
...
since the passed in errorType could be a custom user function,
we instead detect if its an instanceof Error by using a Surrogate
(inspired by Backbone's use of surrogacy)
2013-06-03 21:05:27 -07:00
Sheel Choksi
1c87060804
Fix spec to throw error, ensuring a stack property
...
In Safari Mac 6.0.4 (and possibly other versions), a new error does
not have the stack property. Throwing the error and then catching it
ensures that the stack property has the correct value.
This fix gets the specs to run green in Safari.
2013-06-03 19:25:37 -07:00