Commit Graph

33 Commits

Author SHA1 Message Date
Davis W. Frank & Rajan Agaskar a526ebf261 Re-add async support (achieved via done callbacks)
- TODO: pull out queueRunner into a new object.
2012-12-07 16:36:24 -08:00
Davis W. Frank & Rajan Agaskar c584f182ab Fix getFullName on spec.
- Fixes specFiltering on nested specs
2012-12-07 11:32:52 -08:00
Davis W. Frank & Rajan Agaskar 74f928fd54 Re-add Mock Clock behavior as global 'clock'
- Use clock.install, clock.tick...
- Add unit coverage.
- Fixes old bug in function scheduler
2012-12-07 10:04:47 -08:00
Davis W. Frank & Rajan Agaskar a1011e7748 Rewrite Spec & allow Jasmine to be namespaced
- THere seems to be a performance regression. Large test suites may
  throw
- Regressions: Mock Clock won't install correctly, async specs are
  temporarily not supported.
- Async spec runs/waits interface is gone. Blocks are gone.
- Move most global usage into jasmine.Env constructor.
- Remove optional 'Jasmine running' from HtmlReporter -- caused
  NS_FACTORY_ERROR in firefox when tested
2012-12-06 09:10:24 -08:00
Davis W. Frank & Rajan Agaskar 779dee1211 Remove results from Queue
- consequently, Runner & Suite no longer have results.
- Results come back to reporters from Spec, we should not have a need to
  walk them later via suite/runner (in fact, no reporter used results on
  suite/runner -- only bad tests)
- Remove/clean up tests relying on #results
- Remove integration tests that duplicate already tested behavior
2012-12-03 15:57:16 -08:00
Davis W. Frank & Rajan Agaskar cd3a0c854b buildExpectationResult now returns a data object.
- Meant for passing to reporters.
2012-12-03 15:46:29 -08:00
Davis W. Frank & Rajan Agaskar f9cbad1512 Fix mistaken toFail() expect usage
- It looks like toEqual got globally replaced where it shouldn't have
  been
2012-12-03 15:46:29 -08:00
Davis W. Frank & Rajan Agaskar f840458b34 Encapsulate ExpectationResult 2012-12-03 15:46:29 -08:00
Davis W. Frank & Rajan Agaskar dfed37531e Add unit coverage for ExpectationResult 2012-12-03 15:46:29 -08:00
Davis W. Frank & Rajan Agaskar e2af08e0a6 Move most jasmine global usage into boot.
- thor build scripts broken for now.
2012-12-03 15:46:26 -08:00
Max Brunsfeld e3a013ae99 Allow users to set the pretty-printer's recursion depth
Currently, jasmine's pretty printer traverses objects
to 40 levels of nesting. If an object is more deeply
nested than that, an exception is thrown. I find that
after a few levels of nesting, the output becomes
difficult to read. The process of serializing such
deep objects also sometimes crashes the browser or
causes a 'slow script' warning.

This commit exposes a 'MAX_PRETTY_PRINT_DEPTH' option.
It also causes the pretty printer to skip over
parts of an object that are nested to deeply by simply
printing out 'Object' or 'Array', rather than throwing
an exception.
2012-12-03 15:40:00 -08:00
Max Brunsfeld ead9aa6d5a When pretty-printing objects, don't include inherited properties.
When making assertions about complex objects, Jasmine's
failure message are sometimes gigantic and difficult
to read because the string representation of an object
contains all of the methods and properties in its
prototype chain. This commit causes the pretty printer
to only display on object's own properties.
2012-12-03 15:40:00 -08:00
Joost Elfering d9467317a8 adding a check for the sticky regExp option supported by Firefox and accepted by the ES6. Note that the tests for this case are checking for the support of the sticky parameter. the logic is still tested by the other expect statements in browsers that do not support sticky but will never enter that block as creating a regExp with that flag is not allowed. Coverage is still good. See pivotal/jasmine#234 2012-12-03 15:40:00 -08:00
Joost Elfering 63ad879c12 added some specs to strengthen the coverage pivotal/jasmine#234 2012-12-03 15:40:00 -08:00
Joost Elfering b95c43ab7c resolving issue that was identified via pivotal/jasmine#199 where RegExp objects were not properly compared resulting in non-matching RegExp objects to always return true. a patch to jasmine.Env.equals_ adds an extra step for RexExp objects to be compared. 2012-12-03 15:40:00 -08:00
gvanhove 3685d3199c less confusing messages for toHaveBeenCalledWith 2012-12-03 15:40:00 -08:00
Gunnar Ahlberg a34077a8af cover spy on on undefined method 2012-12-03 15:40:00 -08:00
James Cracknell ac55e26870 Added toBeNaN matcher 2012-12-03 15:40:00 -08:00
John Firebaugh c5c57247f8 Test that show that afterEach and after are not being called when a waitsFor times out. 2012-12-03 15:39:59 -08:00
John Firebaugh 9990eb7b6e Test that afterEach is called after a failing spec. 2012-12-03 15:39:59 -08:00
John Firebaugh b5b50182b2 Consolidate all waitsFor specs in the same describe block. 2012-12-03 15:39:59 -08:00
Dave Burt 5e594946bb Change toBeCloseTo matcher to be more consistent.
It now calculates and compares a difference, rather than rounding
two separate quantities and testing for their equality.
2012-12-03 15:39:59 -08:00
Alex Kwiatkowski 2385acedd8 Add config option which stops jasmine from capturing exceptions in a test 2012-06-23 23:12:31 -04:00
ragaskar 7ad75c13d4 Fix Matchers.any specs in Firefox
- Firefox adds whitespace to the resulting to_string function, necessary
  to remove it for the match to occur correctly.
2012-04-04 08:41:59 -07:00
gvanhove d70e733f70 remove unwanted spaces in it calls, and make the spec counting regex tolerate them if they exist so counts match even when using bad style 2011-11-14 18:43:13 -08:00
gvanhove ac096f9911 convert objectContaining to use jasmineMatches and jasmineToString 2011-11-14 18:29:30 -08:00
gvanhove 08d72926ff More renaming of hash 2011-11-14 18:29:30 -08:00
gvanhove 67ec0af254 use jasmineMatches for equality testing of complicated matchers 2011-11-14 18:29:30 -08:00
gvanhove 4f2fcff15a Use jasmineToString for printing out complicated matchers 2011-11-14 18:29:30 -08:00
gvanhove 7158fc2426 Rename hashContaining to objectContaining, since this is javascript. Also call the toString from prettyPrinter 2011-11-14 18:26:48 -08:00
gvanhove 992367dcbc New matcher "hashContaining" similar to rspec's hash_including 2011-11-14 18:26:48 -08:00
ragaskar 30431a3958 Gem-ize jasmine
[Finishes #13128217]
2011-06-17 21:01:42 -04:00
Davis W. Frank 86b095e5a4 Src & Spec dirs now have same structure; console/, core/, and html/ 2011-06-08 18:30:35 -07:00