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
be0e6222c5
Bumping to 2.0.0-rc2 due to an old, yanked 2.0.0-rc1
2013-07-28 17:55:29 -07:00
Davis W. Frank and Sheel Choksi
8c696ffc71
Release prep for 2.0.0-rc1
2013-07-28 17:31:24 -07:00
Davis W. Frank and Sheel Choksi
3dda67fe60
Building jasmine.js with last change. I'm sorry.
2013-07-28 17:03:12 -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
97ce396008
Build distribution; fix test in FF
2013-07-24 14:41:55 -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
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
d4f78922cd
Update built distribution, it's a few commits behind
2013-07-21 18:36:12 -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
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
Greg Cobb and JR Boyens
f637c1f833
Add images dir
2013-07-18 10:07:47 -07:00
Greg Cobb and JR Boyens
0daae4d7b4
Update examples for 2.0
2013-07-16 10:00:16 -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
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
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 and Sheel Choksi
2916a8a1ff
Cleaning up explicit dependencies
2013-07-01 15:56:29 -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
Sheel Choksi
579fddc2d2
Remove unused formatException from util
...
The ExceptionFormatter is used instead of formatException from jasmine util
2013-06-08 21:46:16 -07:00
Davis W. Frank
313e607135
Merge pull request #369 from sheelc/query-selectors
...
Query selectors
2013-06-07 07:38:11 -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
b4acdbd90a
Remove use of getElementsByTagName and getElementsByClassName
...
Replace calls to these functions with querySelector and querySelectorAll
2013-06-03 19:24:53 -07:00
Davis W. Frank
0ac497db6b
Simplifying toThrow:
...
- It still supports no expected, which means that something was thrown
- Expected value is now tested via equality in order to pass
Adding toThrowError:
- toThrowError() passes if an Error type was thrown
- toThrowError(String) & toThrowError(RegExp) compare Expected to the Error message
- toThrowError(Error constructor) compares Expected to the constructor of what was thrown
- toThrowError(Error constructor, String) & toThrowError(Error constructor, RegExp) compares both the Error and the message
Also, equality now handles Errors, enforcing the message as part of the equality.
2013-06-03 09:24:43 -07:00
Davis W. Frank
9e31201f1a
Breaking out Spies into their own source file
2013-06-03 08:22:45 -07:00
Davis W. Frank
d53002c63a
Matchers & Matchers specs now broken up into individual files. There is now a requireMatchers jasmineRequire function to attach matchers properly.
2013-06-02 22:22:25 -07:00
Davis W. Frank
3271dc8838
Last commit did not include self-test with Any and ObjectContaining in separate files. Fixed.
2013-06-02 22:16:30 -07:00
Davis W. Frank
aca43bd3a3
Squashed commit of work to make Jasmine a collection of isolated modules. Note now that in our test suite, "jasmine" now always refers to the build jasmine loaded from jasmine.js and "j$" always refers to the code in the src directories.
...
Also, dev_boot.js is now a copy of boot.js and has additional changes to load jasmine the second time, into the j$ reference.
2013-05-28 14:09:20 -07:00
Sheel Choksi
bf2adf55eb
Add titles to specs in HtmlReporter
...
Each spec symbol contains a title, which is the full name of the
spec it represents.
[Finishes #48420677 ]
2013-04-28 21:35:12 -07:00
Davis W. Frank
dd8d3f9788
Fix [ #48420035 ]
2013-04-20 08:27:38 -07:00
Sheel Choksi
c017257164
add in regex matching for toThrow matcher
2013-04-07 16:15:07 -07:00
Sheel Choksi
2445fb36dc
simplify failure message logic in the toThrow matcher
2013-04-06 22:06:14 -07:00
Sheel Choksi
eec6d7d23e
update lib/jasmine-core/jasmine.js to make 'grunt execSpecsinNode' pass again
2013-04-06 22:03:31 -07:00