Greg Cobb and Luan Santos
c9e37a2a1c
Refactor prettyPrinter to work with immutable objects
...
[#50766813 ][#266 ]
2014-03-12 11:41:18 -07:00
Greg Cobb and Luan Santos
ba6f99423f
Add jasmine logo image to html runner
...
[#3984585 ]
2014-03-10 17:16:31 -07:00
Christopher Amavisca, Greg Cobb and Luan Santos
3a5672cd33
Show message if no specs are found in console reporter
...
[#12784235 ]
2014-03-10 12:00:49 -07:00
Christopher Amavisca, Greg Cobb and Luan Santos
af4cc76e2a
Show message if no specs are found
...
[#12784235 ]
2014-03-10 11:23:27 -07:00
Christopher Amavisca, Greg Cobb and Luan Santos
1922514f2d
Specs without expectations should be alerted to the user
...
- Add console.error to the HtmlReporter when there is a spec without any expectation
- Change the spec's link text and color to include a warning
- Create a status for specs to label them as "empty"
- console is not accessible to IE unless you have developer tools open,
so protect against that by mocking console.
[#59424794 ]
2014-03-10 11:19:07 -07:00
Christopher Amavisca and Greg Cobb
668846147c
Fix issues with displaying error messages for afterAll (browser compatibility)
...
- Switch from showing error stack to showing message/description since only chrome/ff support stack
- Fallback to error.description if error.message is undefined
- Made exceptionList variable name consistent between both reporters
2014-03-06 18:25:49 -08:00
Christopher Amavisca and Greg Cobb
76fafa0388
Deprecate suite/spec ordering hook .
...
- Remove parameter from env.execute()
- Remove deprecated test
- Set runnablesToRun to always start with the topSuite
[#66789174 ]
2014-03-06 16:54:53 -08:00
Christopher Amavisca and Greg Cobb
bed1c15ea4
HtmlReporter shows error alerts for afterAllExceptions
...
-Add list of exceptions in HtmlReporter to push to on error
-Create alerts for each exception in the list (with stack trace)
[#67055688 ]
2014-03-06 15:39:04 -08:00
Christopher Amavisca and Greg Cobb
6caf4c5de2
Print afterAllExceptions to the console.
...
- Add afterAllException function to ConsoleReporter
- Print the stack traces of the errors at the end of the console output
[#67055730 ]
2014-03-06 15:02:55 -08:00
Christopher Amavisca and Greg Cobb
97ae9a2d88
After all exceptions dispatch to reporter hook
...
- Add 'afterAllException' hook to reporter dispatch, we might want to make this more generic in the future
- Add afterAllException function to HtmlReporter
[#66789174 ]
2014-03-06 12:01:37 -08:00
Christopher Amavisca and Greg Cobb
a3c3505086
beforeAll can have expectations and passes expectation failures to its children
...
[#66789174 ]
2014-03-05 16:27:58 -08:00
Christopher Amavisca and Greg Cobb
a9e0112a9b
Throw error if you add a custom matcher or equality outside of a runnable
...
[#66789174 ]
2014-03-05 14:37:17 -08:00
Christopher Amavisca and Greg Cobb
a2ac5ef3b6
Throw error if you define a spy outside of a runnable
...
[#66789174 ]
2014-03-05 14:27:19 -08:00
Christopher Amavisca and Greg Cobb
b200952195
Only clear resources if suite is not disabled
...
[#66789174 ]
2014-03-05 14:00:57 -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
Gregg Van Hove and Sheel Choksi
52026fb0f7
beforeAll/afterAll can be timed out and errors are applied to all children specs
2014-03-03 16:13:59 -08:00
Gregg Van Hove and Sheel Choksi
e17a2cb1e0
share usercontext for full suite
2014-03-03 11:57:32 -08:00
Gregg Van Hove and Sheel Choksi
ec5695acc1
first (naive) pass at beforeAll/afterAll
2014-03-03 09:26:39 -08:00
Chris Bandy
47884032ad
Fix ObjectContaining to match recursively
...
matchersUtil.equals() does not expect a matcher as its first argument,
so send the "actual" value first and the "expected" value second.
2014-03-02 11:42:37 -06:00
Christopher Amavisca and Sheel Choksi
9d1e92f5e2
Clean up more remnants of dev_boot
2014-02-27 18:02:14 -08:00
Elana Koren and Gregg Van Hove
eebba2ecca
Support browsers that don't supply a Date.now()
...
- install the mockDate by calling `mockDate` on `clock` instead of
passing an argument to `clock.install()`
[Finishes #66606132 ] Closes #361
2014-02-27 11:55:25 -08:00
Elana Koren and Gregg Van Hove
627a262085
Merge branch 'mock-date' of https://github.com/jalopez/jasmine into jalopez-mock-date
2014-02-27 10:03:35 -08:00
Christopher Amavisca and Sheel Choksi
305bd73142
Instead of dev boot use a custom helper to defined j$
2014-02-26 17:35:10 -08:00
Greg Cobb and Sheel Choksi
640f94a1bd
Don't allow calling the same done callback multiple times
...
[finishes #62585700 ][fixes #523 ]
2014-02-25 18:06:30 -08:00
Greg Cobb and Sheel Choksi
5aac3e3292
Refactor Spec and QueueRunner [ #62585700 ]
...
- QueueRunner now responsible for timing out async specs instead of
Spec
- Make sure only spec functions are timeoutable and not suites (due to
the refactor)
2014-02-25 18:06:30 -08:00
Sheel Choksi
76ca5ef6d4
Allow matcher custom failure messages to be a function
...
By deferring the evaluation of these messages, we can avoid the
expensive creation of them when in the majority use case (tests are
passing) they are not needed.
These failure messages were causing performance problems with larger
objects needed to be pretty printed as discussed in #520 and brought up
by @rdy.
[fixes #65925900 ][fixes #520 ]
2014-02-18 20:05:30 -08:00
Sheel Choksi
46d2c43da1
Revert "Use default failure message for toBeNaN"
...
Forgot that NaN has special casing that it needs a custom error message
for
This reverts commit b6c03a34e7 .
2014-02-18 19:14:16 -08:00
Sheel Choksi
b6c03a34e7
Use default failure message for toBeNaN
...
It is providing the same functionality by default without a custom error message
2014-02-17 22:45:54 -08:00
Sheel Choksi
7cf899a4ea
Special case printing -0
...
Use the 1/x trick to determine if a value is -0 and special case the
printing of it.
[closes #496 ]
2014-02-09 14:14:33 -08:00
Sheel Choksi
83c0ea7f91
Fix error message in jasmine.any
...
The expected any 'class' was not being included in the error message
due to accessing the wrong property
2014-02-09 14:06:47 -08:00
Sheel Choksi
289c8313d1
Short spec to document why we close over Date and ensure cross-browser compatibility
...
[closes #506 ]
2014-02-09 12:20:03 -08:00
Sheel Choksi
9c7ba43ebd
Clean up a bunch of spec global variable leaks
...
Also some formatting changes to highlight when using one 'var' with comma operator
2014-01-18 14:17:14 -08:00
Sheel Choksi
8ca08ff999
Run Object.create(null) spec on all browsers not IE 8
...
IE 8 doesn't support Object.create so there shouldn't be a need to run this spec in IE 8
2014-01-18 13:12:07 -08:00
slackersoft
15aa3ecb5d
Better support in pretty printer when an object has null prototype
...
- Fixes #500
2014-01-17 19:56:43 -10:00
Sheel Choksi
06a553503d
Better failure message when something is thrown that's not an error
...
Change from 'undefined : undefined' to '<thing that was thrown> thrown'
Pointed out by @charleshansen
2014-01-09 22:10:40 -08:00
Sheel Choksi
b525313cdb
Make the check for pending spec exception work for values that don't have toString
2014-01-04 23:11:20 -08:00
pimterry
b1d4ab09af
Add tests for call return value tracking
2013-12-08 13:40:25 +00:00
pimterry
83a692d5a8
Use the correct Jasmine version in the spy integration tests
2013-12-07 22:16:24 +00:00
pimterry
14a8c2ca09
Move spy integration tests out of the unit test suite
2013-12-07 20:52:02 +00:00
pimterry
b2e8de7bcd
Mock callTracker in spy tests for better test isolation
2013-12-07 20:43:38 +00:00
pimterry
1d98a23b14
Add tests for call tracking in createSpy
2013-12-07 20:27:08 +00:00
Sheel Choksi
16ffd3b3fb
Fix up specs that failed when maximumSpecCallbackDepth is set to 1
2013-11-22 23:04:42 -08:00
Maciej Filip Szkodziński
c78fba4b13
Sets and executes timeouts set during a tick.
...
All timeouts and intervals set during a tick were being scheduled to run
at delay + end-of-tick, instead of delay + time-of-outer-timeout.
Scheduled run-at times were shifted because currentTime was being
incremented before executing scheduled functions.
Additionally, the execute loop was iterating over a functions-to-run
array, created from scheduledFunctions before starting. Any changes to
scheduledFunctions were being ignored during the tick, and the next tick
would ignore any functions which should have been executed in the past.
The commit is a rewrite of DelayedFunctionScheduler, preserving the
public interface. Execution of scheduled functions updates currentTime
on each iteration, and each time takes the functions with the lowest
runAtMillis from the schedule, if they aren't higher than endTime.
2013-11-17 17:14:29 -08:00
Sheel Choksi
8a6d7828c6
Make all async functions be subject to the timeout
...
[finishes #60798058 ]
2013-11-14 23:01:43 -08:00
Sheel Choksi
c888b0c1b8
Slight refactoring of clearing timeouts when an exception is thrown
2013-11-14 20:48:28 -08:00
Sheel Choksi
7ee5073921
Fix bad merge
2013-11-11 21:01:36 -08:00
Sheel Choksi
614a18453e
Rename Spec's queueRunner to more accurately be a queueRunnerFactory
2013-11-11 20:53:13 -08:00
François Daoust
4a7b79ad0d
Regression spec added for timeout timer in an async spec
...
The spec ensures that the timeout timer is properly cleared out
even when the async spec throws an exception.
2013-11-07 16:08:41 +01:00
Sheel Choksi
1b6725ec25
Updating Spec#getFullName spec to work in IE 8
...
Forgot that the pretty printer is not functional in IE 8, which
subsequently brings down toHaveBeenCalledWith
2013-11-04 21:59:06 -08:00
Sheel Choksi
952eb59707
Change test for how a spy gets its full name
...
- Removes another TODO
- A spec uses its full name as soon as it is created (for the result
object) and so it needed to be tested differently
2013-11-04 21:38:01 -08:00