slackersoft
482f4d62fc
Add anything matcher to match any value that is neither null or undefined
...
[finish #58117878 ] Fix #186
2014-12-17 12:58:47 -08:00
slackersoft
bfcd8b046d
Allow asymmetric equality testers to preempt their symmetric brethren
...
- Also allow them to be compared to each other properly.
Fixes #540
2014-12-16 17:45:58 -08:00
slackersoft
2ab22951a1
Just check if either side implements asymmetricMatch
...
- Don't explicitly look for `Any` or `ObjectContaining`
[#82295210 ]
2014-12-16 17:29:18 -08:00
slackersoft
ea88023553
Check for ObjectContaining on either side of equality.
...
- Also clean up `undefined` check.
Fixes #682
2014-12-16 17:07:35 -08:00
slackersoft
6bd98cb2ab
Rename jasmineMatches to asymmetricMatch
...
- This should be more clear what it is for
[finish #82295210 ]
2014-12-16 16:47:31 -08:00
slackersoft
b4b3ac25a1
spyOn explicitly checks to see that a method name to spy on was passed.
...
[finish #27689237 ]
2014-12-16 13:21:48 -08:00
slackersoft
7570bc422b
Display the name of the constructor when pretty printing objects
...
Fixes #598 [finishes #81228592 ]
2014-12-16 12:56:04 -08:00
slackersoft
305252f5a8
toMatch requires the expected to be a String or RegExp
...
- Otherwise it was using the `toString` as the RegExp, which is almost
definitely _not_ what you want.
Fixes #723
2014-12-16 11:50:45 -08:00
slackersoft
0fdb28c6ff
Merge branch 'toEqualDomNodes' of https://github.com/alexeibs/jasmine into alexeibs-toEqualDomNodes
2014-12-16 11:25:14 -08:00
slackersoft
a84202a6f9
Also check custom properties on Arrays when computing equality
...
[Finishes #50616649 ]
2014-12-16 10:22:23 -08:00
slackersoft
8bb2f67fb3
Properly record finishing an xdescribe so further cleanup works
...
Fix #724
2014-12-09 12:40:00 -08:00
slackersoft
02161b7d48
ObjectContaining no longer tries to track exact mismatches
...
- equals wasn't looking at it anyways, so just bail as soon as something
is different.
2014-12-05 08:06:20 -08:00
slackersoft
4d5f27d359
Reschedule all functions for a tick before executing any
...
- This allows any function run during a tick to cancel any other in the
same tick.
Fixes #708
2014-12-05 08:01:34 -08:00
slackersoft
9f94e8e226
Top level suite no longer reports suiteStart and suiteDone
...
- jasmineStart and jasmineDone are reported separately
Fixes #716
2014-11-28 21:25:45 -08:00
slackersoft
23a492cb65
Suites still run their children even if none are executable
...
- Continue skipping beforeAll and afterAll
Fixes #707
2014-11-16 14:43:44 -08:00
slackersoft
42b1bda919
Top-level suite triggers suiteStarted and suiteEnd to be consistent
...
Fixes #706
2014-11-14 18:37:00 -08:00
Charles Hansen
da6813ef0d
toContain works with array-like objects (Arguments, HTMLCollections, etc)
...
Fixes #699
Don't rely on Array.prototype.indexOf for testing containment (not in IE8)
2014-11-03 13:09:57 -08:00
slackersoft
a4d134521a
Revert "toContain works with array-like objects (Arguments, HTMLCollections, etc)"
...
IE 8 doesn't have Array.prototype.indexOf so this breaks there.
Reverting until we can figure out a better way to solve across all
supported browsers.
This reverts commit 663fbd0cdb .
2014-11-01 14:28:32 -07:00
Charles Hansen
663fbd0cdb
toContain works with array-like objects (Arguments, HTMLCollections, etc)
...
Fix #699
2014-10-30 13:08:16 -07:00
Mateusz Derks
3b557f85c7
Fixed isPendingSpecException test title
2014-10-17 15:36:24 +02:00
Gerg
c8cd2eabe5
Fixes console check for IE8
...
- Was causing IE8 to hang for some reason
- Also reverts previous commit, not that issue was resolved
[#79533268 ][fixes #80356450 ]
2014-10-09 00:41:17 -07:00
Gerg
f77071254a
Fixes additional odd IE8 failure
...
[#79533268 ]
2014-10-08 23:14:40 -07:00
Gerg
8880729250
JsApiReporter suiteResults only includes suite results
...
- It was including suite starts also
[#79533268 ]
2014-10-08 22:33:36 -07:00
Gerg
a5cd2731b4
Fixes CI for IE8
...
For some reason, when you put this spec in a describe block, it causes
specs to hang on IE8. I tried to debug this for a while, and I have no
idea what is happening.
[#79533268 ]
2014-10-05 14:33:40 -07:00
Gerg
b12974db2e
Adds suiteResults method to JsApiReporter
...
- Behaves similarly to to specResults
- Since suites were stored in an object instead of an array and the
current interface exposes this object, we now must keep track of suites
twice in the reporter. We cannot just construct the object lazily,
because then the object will not update with new suite results
like it does currently (see JsApiReporterSpec:148).
[#79533268 ]
2014-10-04 18:36:38 -07:00
slackersoft
f4e5573ee3
Add explicit fail and move on for async functions
...
- `done` now has a `fail` property which will call the global `fail`
then continue to the next function in the queue
[finish #73744618 ] Fix #567 Fix #568
2014-10-02 08:10:29 -07:00
slackersoft
eefa716530
set suite status to failed when afterAll has failures
2014-09-26 09:12:48 -07:00
slackersoft
66c364564e
Fix custom timeout specs for firefox
2014-09-26 08:21:54 -07:00
slackersoft
68ba5b6d48
Allow custom timeout for beforeEach, afterEach, beforeAll, afterAll and it
...
Fix #483
2014-09-25 22:31:00 -07:00
slackersoft
1fb0d2eefa
Merge branch 'master' of https://github.com/chernetsov/jasmine into chernetsov-master
...
Fix #678 Close #679
2014-09-25 12:59:10 -07:00
slackersoft
ba0982d89f
Merge branch 'beforeAll' into master
...
Conflicts:
lib/jasmine-core/boot.js
lib/jasmine-core/boot/boot.js
lib/jasmine-core/jasmine.css
lib/jasmine-core/jasmine.js
spec/core/SpecSpec.js
spec/core/SuiteSpec.js
spec/core/integration/EnvSpec.js
spec/node_suite.js
src/core/Env.js
src/core/requireCore.js
src/core/util.js
2014-09-24 20:20:39 -07:00
Misha Chernetsov
62840f72a6
when jasmine clock is installed and date is mocked new Date() instanceof Date should equal true
2014-09-24 15:07:22 -07:00
slackersoft
6d10f97151
Merge branch 'toThrowError_refactor'
2014-09-24 13:23:50 -07:00
slackersoft
b1344d5c73
Add explicit fail function.
...
- Adds an expectation failure to the current spec
[finishes #70975468 ] Fix #563
2014-09-23 08:00:46 -07:00
slackersoft
4889583d5c
Merge branch 'trackReturnValues' of https://github.com/pimterry/jasmine into pimterry-trackReturnValues
2014-09-22 13:04:01 -07:00
slackersoft
bd30065d66
Merge branch 'chain_spy_andReturn' of https://github.com/mkhanal/jasmine into mkhanal-chain_spy_andReturn
2014-09-15 13:10:24 -07:00
slackersoft
84dff421ea
Use === when checking for circular dependencies for pretty printing.
2014-09-13 18:58:02 -07:00
Mridul
709e032d1c
Added returnValues functionality to spy strategy
2014-09-13 12:41:20 +10:00
Greg Cobb
1290d93b6a
Suite result status added when suite is complete
...
- This makes it easier to detect afterAll failures, because we can
rely only complete runnables having statuses
[#78306786 & #73741654 ]
2014-09-09 11:26:32 -07:00
slackersoft
345903220c
Refactor toThrowError to be less one huge if/else if/else if block
...
- This should also improve it's code climate score as well.
- It's also about 20 lines shorter now too :)
[#59524164 ]
2014-09-07 16:02:42 -07:00
Greg Cobb
3332f93a24
Only run focused runnables inside focused suites
...
- Focused runnables now walk up the tree to unfocus the first focused
ancestor. Because of the way the tree is constructed, this makes sure
that each focused runnable has no focused ancestors.
[#78289686 ]
2014-09-05 12:25:28 -07:00
slackersoft
3b19d66268
Check for afterAll failures in a more browser independent way.
...
- Only look at the message, so browsers that don't provide a stack don't
blow up.
2014-09-04 18:49:14 -07:00
slackersoft
137c1a39f6
Check afterAll failure messages with regexp, since some browsers add more info
2014-09-04 08:15:23 -07:00
slackersoft
9402d59859
Suites report errors in afterAlls in the suiteDone event
...
- remove `afterAllEvent` from reporters
2014-09-03 22:18:20 -07:00
Tomás Girardi
eb48c83649
Add specs for intervals that "clear themselves"
...
Add specs to test if issue #655 is present: the handler of an interval
cannot successfully clear the same interval that generated it's
invocation.
The most direct test consist in setting an interval with a handler that
calls clearInterval over that same interval and make the clock tick for
double of it's period. If the issue is present the interval's handler
will be called twice. If the issue is not present, the first invocation
of the handler will avoid a second one (because of the clearInterval).
Another test is included in order to check if recurring scheduled
functions are rescheduled before being called. Doing this in the reverse
order is the exact cause of the issue.
2014-08-28 20:58:30 -04:00
Greg Cobb and Tim Jarratt
08a35d134d
Ensure focused tests are only run once
...
Required duplicating some of the logic for constructing a suite from
describe so that we could mark a suite as focused in fdescribe, but
otherwise this prevents focused tests from being run more than once.
[#73742944 ]
2014-08-28 17:54:42 -07:00
Greg Cobb and Tim Jarratt
14824b5f9e
Expose fit and fdescribe in boot.js
...
* adds done() callbacks to existing specs (because we forgot, whoops!)
[Finishes #73742944 ]
2014-08-28 16:37:37 -07:00
Greg Cobb and Tim Jarratt
9afae3d978
Add a test documenting fits in fdescribes
...
Yo, this probably isn't the best behavior. Rspec and Ginkgo definitely
do not exhibit this behavior when you nest focused runnables inside
other focused runnables. We thought fixing it, but it seems like a
nontrivial refactoring would be necessary to clean this up.
[#73742944 ]
2014-08-28 16:19:31 -07:00
Greg Cobb and Tim Jarratt
64a67ed320
Trim extraneous whitespace
2014-08-28 15:55:39 -07:00
Greg Cobb and Tim Jarratt
dee1066652
Focused runnables play nicely with beforeAll/afterAll
...
[#73742944 ]
2014-08-28 15:54:27 -07:00