Gregg Van Hove
ea4c44904d
IE 8 doesn't support defineProperty on non-DOM nodes, skip that kindof thing
2015-10-26 17:41:30 -07:00
Gregg Van Hove
a85c3a4da8
Check for descriptor
2015-10-26 17:03:45 -07:00
Stephan Bijzitter
a81466d9e7
Abort spying when the target cannot be spied on
2015-10-21 12:44:52 +02:00
Cody Sehl
e5c2572753
Change #xit so that it will output a more BDD-style pending message
2015-10-14 21:03:47 -06:00
Gregg Van Hove
4221b2d2c4
Merge branch 'random-tests' of https://github.com/marcioj/jasmine into marcioj-random-tests
2015-10-04 14:03:17 -07:00
Marcio Junior
3f3fa484b2
Allow tests to run in random order
2015-09-26 14:53:08 -03:00
Paul Jolly
d0ad9b98cd
Use toString for objects if it has been overriden
2015-09-25 20:19:48 +01:00
Gregg Van Hove
4097718b66
Merge pull request #906 from soycode/master
...
check for global before assigning
2015-09-03 13:38:21 -07:00
Martin Camacho
f3a7396845
afterEach behavior
2015-08-18 17:55:03 -04:00
soycode
850bee5492
check for global before assigning
2015-08-17 14:20:52 -07:00
Greg Chattin-McNichols and Gregg Van Hove
750a9aac6d
Merge pull request #869 from ljwall/jasmine
...
Fixes #855
2015-08-03 15:01:43 -07:00
Kevin
a6a1962924
add toHaveBeenCalledTimes matcher
...
Fix #853
2015-06-05 21:07:24 -07:00
Liam Wall
7bfc4c0a45
xdescribe marks pending, plus associated tests.
2015-05-29 17:21:28 +01:00
Dan Finnie
302e78f1df
Raise an error when jasmine.any() isn't passed a constructor
2015-05-17 02:21:26 -04:00
Gregg Van Hove
65a6decd6d
Fix ordering for suites with more than 11 direct children.
...
- When no specs were focused, they all had the same precedence, and
`sort`ing them caused some of the nodes to move around
Fixes #850
2015-05-13 14:45:11 -07:00
Robert Neumann
225c7bdda3
Set the shared user context correctly when executing the top level suite
...
Fixes #846
2015-05-11 10:29:51 -07:00
Gregg Van Hove
add841a1e9
A spec without a function provided should be pending not disabled
...
Fixes #840
2015-05-07 13:46:52 -07:00
Gregg Van Hove
ff029b37b5
Use instanceof when checking Error types in toThrowError
...
Fixes #819
2015-04-09 15:38:24 -07:00
Gregg Van Hove
1d366772b7
Don't throw if we're already handling an exception
...
[finish #91407284 ]
2015-03-30 08:19:06 -07:00
Gregg Van Hove and Nikhil Gajwani
d137b83c1c
Don't install the clock if the current timing functions aren't the originals
...
[finish #64116664 ] Fix #782
2015-03-27 10:14:03 -07:00
Gregg Van Hove
965229bd03
Properly pass j$ to Any so it can use other jasmine stuff
...
Fixes #806
2015-03-18 13:12:40 -07:00
Steve Gravrock
2af9a45fb2
Correctly handle functions that are scheduled after the clock is uninstalled and reinstalled from within Clock#tick.
...
Fixes #790 .
2015-03-14 17:40:27 -07:00
slackersoft
eb1d98338a
Properly inject j$ into Suite
2015-03-06 11:43:57 -08:00
Gregg Van Hove and Molly Trombley-McCann
7693a4c959
Allow user to stop a specs execution when an expectation fails
...
[finish #1165916 ] #577
2015-03-05 15:28:00 -08:00
Gregg Van Hove
ce9600a3f6
Allow the clock to be installed for the duration of a single closure
...
[finish #67434180 ]
2015-03-04 17:41:49 -08:00
Gregg Van Hove
c77ff30263
Show the name of the constructor function when printing an any
...
- instead of a `toString` of the entire constructor
Fixes #796
2015-03-03 13:27:31 -08:00
Gregg Van Hove
dc652cfb05
Clean up some TreeProcessor stuff.
...
- Properly segment parents of segmented suites
2015-03-03 13:14:20 -08:00
slackersoft
715de7aa38
Implement TreeProcessor to solve some issues with running the suite
...
- execute beforeAll/afterAll once per suite instead of once per child
when running focused specs/suites Fixes #773
- refuse to execute an order if it would cause a suite with a beforeAll
or afterAll to be re-entered after leaving once
- report children of an xdescribe similarly to how they would be
reported if they were themselves x'd out Fixes #774
- only process the tree once instead of figuring it out again at each
level
[finishes #87545620 ]
Fixes #776
2015-03-02 11:41:45 -08:00
Greg Cobb
10f87b3b90
Fixes issue where mock clock was being used by QueueRunner
...
- If the mock clock was installed in a beforeAll, the QueueRunner would use the mock clock for its own clock. If the mock clock was ticked more than the default timeout, async specs would timeout.
[fixes #783 #792 ]
2015-02-24 21:56:52 -05:00
Greg Cobb and Gregg Van Hove
69956bf8f6
ObjectContaining matches prototype properties
...
[#769 ]
2015-02-05 14:15:57 -08:00
Greg Cobb and Gregg Van Hove
d5dfbc98c3
Updates pretty printer to include array properties
...
[fixes #766 ][finishes #87644044 ]
2015-02-04 11:05:03 -08:00
Greg Cobb and Gregg Van Hove
f22862fd80
Merge branch 'juliemr-arrayfix'
...
Fixes #765
2015-02-04 09:38:45 -08:00
Julie Ralph
53b0752ff0
Allow arrays from different frames or contexts to be equal
2015-02-04 09:28:04 -08:00
slackersoft
8e3066db42
Allow pending to take a reason and show it in the HtmlReporter
...
[#78954014 ] Fix #671
2015-01-26 15:55:31 -08:00
slackersoft
dca543accb
Merge branch 'gjs-global-object' of https://github.com/ptomato/jasmine into ptomato-gjs-global-object
2015-01-26 12:21:56 -08:00
slackersoft
b54de4a180
Merge branch 'spidermonkey-compat' of https://github.com/ptomato/jasmine into ptomato-spidermonkey-compat
2015-01-26 11:47:09 -08:00
Philip Chimento
ebaa2e7f24
Set jasmineGlobal correctly in GJS
...
In GJS, jasmineGlobal was not getting set to the global object; when
importing jasmine.js in GJS, "this" resolves to the jasmine.js module
object, not the global object. Solve this specifically for GJS by
assuming that `window.toString === '[object GjsGlobal]'` only in GJS; if
this is the case, assign "window" to "jasmineGlobal".
Adding a "var" to the declaration of "getJasmineRequireObj" is also
necessary, or else "getJasmineRequireObj" won't be exported in the
Jasmine module.
See #751
2015-01-24 23:50:40 -08:00
Philip Chimento
5eaf7152bf
Fix some SpiderMonkey lint
...
SpiderMonkey complains about functions not always returning a value. In
most cases that is a conscious code style choice, so it is not fixed
here.
In one case (MockDate) the interpreter thought you could have fallen off
the end of a "switch" statement, although the number of arguments
prevented that. This was fixed by changing the last case to "default".
In another case (QueueRunner) the function really did return a value
sometimes and nothing other times, although as far as I could see, it
could only ever return "undefined". The function now explicitly only
returns no value.
See #751
2015-01-24 23:43:38 -08:00
Greg Cobb
ebbaab4cf9
Prevents *Alls from running when runnables are explicitly set
...
- This requires passing if runnables are set to the Suite. Hopefully in
the future we will change how focused runnables and *Alls interact so
this is no longer necessary.
[#732 ]
2015-01-23 17:27:13 -08:00
Greg Cobb
1936a36c79
Fix jslint issues
2015-01-23 17:23:07 -08:00
slackersoft
1dd4af3835
anything and stringMatching have custom pretty-print now.
2015-01-21 12:59:01 -08:00
Gregg Van Hove
3140d5fb95
Allow createSpyObj to be called with just an array of method names
...
[Finish #50757607 ] #321
2015-01-12 15:16:50 -08:00
Gregg Van Hove
69a61547e7
Don't forget to buildDistribution
...
- Also fix jshint errors
[#59947350 ] #440
2015-01-12 14:10:50 -08:00
Gregg Van Hove
a999490de9
Merge branch 'arrayContaining' of https://github.com/slackersoft/jasmine into slackersoft-arrayContaining
...
Merge #440 [Finish #59947350 ]
2015-01-12 14:01:02 -08:00
Gregg Van Hove
3a93f845d6
Use the stack trace from the Error object if supplied
...
Fixes #734
2015-01-12 11:51:45 -08:00
Rohit Arondekar
a84eaf2cbe
Allow null prototype obj to be compared for equals
...
Fixes #729
2014-12-20 08:35:27 +05:30
slackersoft
dfa8a77dc3
Add asymmetric equality tester to match a string against a regexp
...
- Also move the asymmetric testers into their own dir for easier
locating.
[#58120558 ] Fix #243
2014-12-19 12:39:24 -08:00
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