Commit Graph

1272 Commits

Author SHA1 Message Date
Greg Cobb and Tim Jarratt d7ab9083be Add focused describe
[#73742944]
2014-08-28 15:43:59 -07:00
Greg Cobb and Tim Jarratt caee1508d1 Adds a fit function to Env
[#73742944]
2014-08-28 15:37:18 -07:00
slackersoft 3b8326f1e6 Detect global object properly when getting the jasmine require obj
- Pull global detection into requireCore and pass the global to base

Fix #569
[fix #73684570]
2014-08-28 13:31:04 -07:00
Greg Cobb and Tim Jarratt 980509cd7b Preserve relative order of "alls" w.r.t. "eachs"
[Finishes #73742528]
2014-08-28 11:54:58 -07:00
Greg Cobb and Tim Jarratt b984ff2fa6 Run before,afterAlls as 'eachs' when specifying runnablesToRun
- Fix bug where beforeAlls were being mutated in Suite#execute
- When Env.execute() receives a list of runnables, beforeAlls and
  afterAlls are collected as beforeEachs and afterEachs. This allows
  runnables to be specified in any order, regardless of if any of them
  have before/afterAlls.
- Spec constructor takes a single function that returns both before and
  afters, instead of two functions. This breaks the current interface
  for constructing a Spec.

[#73742528]
2014-08-28 11:54:54 -07:00
Greg Cobb and Tim Jarratt 61bf9ac7d7 Improve quality of async timeout for afterAll spec
We found that this test was always passing and had strange interactions
with the ordering of other specs. Rewriting it to explicitly finish the
afterAll after a specified interval makes it fail correctly.

[#73742528]
2014-08-28 11:54:46 -07:00
Greg Cobb and Tim Jarratt 5b397ff33e Revert "Deprecate suite/spec ordering hook ."
This reverts commit 76fafa0388.

[#73742528]
2014-08-28 11:54:27 -07:00
Greg Cobb and Tim Jarratt cd4d5c2445 ConsoleReporter exits 1 when afterAll events occur
[Finishes #67068790]
2014-08-27 14:45:59 -07:00
Greg Cobb and Tim Jarratt 5b6edff3fd Report AfterAll failures as they occur
There didn't seem to be a valid reason to wait until the very end to
report these.
2014-08-27 14:01:28 -07:00
Greg Cobb and Tim Jarratt cc3678f033 Refactor suite to share reportExpectationFailure func
This was shared between our suite factory and the suite factory.
Sweet.
2014-08-27 13:50:56 -07:00
Greg Cobb and Tim Jarratt 35f52bcb24 Rewrite an incorrect suite spec 2014-08-27 12:27:11 -07:00
slackersoft f8bccabf03 Move afterAll reporting into Suite since that's where they're being tracked 2014-08-27 08:13:17 -07:00
Greg Cobb and Tim Jarratt 97867b2bf5 Reports expectation failures in afterAlls
This makes the specs green and appears to work for most cases. I have a
number of concerns about the implementation and would appreciate
ideas/feedback.

- Suite#addExpecationResult infers if it is coming from an afterAll fn
  based on if the first child of the suite is finished. This assumes
  that the first child of the suite is a spec (this appears to be true
  as long as there is at least one spec in the suite)
  - Suites behave like unfinished specs. Because suites will propagate
    expectation failures to their children suites, the afterAll
    expectation reporting appears to work for suites without specs
    unless you have:
    1) An otherwise empty suite with an afterAll
    2) An afterAll'd suite whose first suite is empty (or whose first
    suite's first suite is empty (and so on))
- Changed afterAllError to afterAllEvent, so it can accommodate both
  errors and expectation failures. The reporter now receives a string
  instead of the actual error object. The loss of the object doesn't
  affect our reporters, but may be a nice-to-have for other reporters/
  the future.
- The gap between the expectations caught in Suite and QueueRunner (who
  triggers reporting via an injected callback) is an array injected into
  QR by the Suite. The array is then flushed at some point (currently
  after the attempt… functions). This works, but is a bit goofy.

[#73741654]
2014-08-26 18:04:12 -07:00
slackersoft 18eb6e2f36 Don't run npm package specs in browsers 2014-08-26 13:18:16 -07:00
Tomás Girardi 51462f369b Allow clearInterval to clear it's own interval
As described in issue #655, the handler of an interval cannot
successfully clear the same interval that generated it's invocation.

Solve this issue by changing the order in which interval's handlers are
called and then rescheduled to: first reschedule it and then call it.

The actual order (call first then reschedule) produces that, during the
execution of the interval's handler, the handler is not registered as
a function to run after a timeout or interval ("scheduledFunctions"),
because it was previously unregistered. Consequently, if the handler
calls clearInterval, that function wont be able to find the handler and
remove it completely.
2014-08-26 12:01:49 -04:00
slackersoft ea57ad97cf Add some tests to make sure we're packaging up the npm properly 2014-08-26 08:08:04 -07:00
slackersoft 3132d98f23 Bump version to 2.0.4 now that I think npm files are sorted v2.0.4 2014-08-24 21:14:11 -07:00
slackersoft b799f54bc9 Remove runtime dependency on 'glob' so we have no runtime deps
- Clean up .npmignore a bit more
2014-08-24 21:11:50 -07:00
Alexei Bykov ac8ef2988d add better support of DOM nodes into equality matcher 2014-08-24 17:07:18 +04:00
slackersoft 3c051fc291 bump to 2.0.3 to fix npm dependencies v2.0.3 2014-08-22 22:50:46 -07:00
slackersoft 6b937da863 Fix npm dependencies 2014-08-22 22:47:43 -07:00
slackersoft 89232db2ee Version bump to 2.0.2 v2.0.2 2014-08-22 22:20:38 -07:00
slackersoft 8b0d9c83bb keep the files for running in a webpage around in the npm package
[Fixes #656]
2014-08-21 12:56:04 -07:00
slackersoft 60533ca868 Expose files and paths necessary to embed jasmine in an html page for nodejs 2014-08-21 08:17:02 -07:00
slackersoft 048ab728ec Pull out the building of the jasmine interface so node and web both get the same one. 2014-08-15 08:14:59 -07:00
slackersoft 488df899fb Merge branch 'javenwang-suite-start' 2014-08-06 13:24:25 -07:00
slackersoft 753f4b44b4 Merge branch 'suite-start' of https://github.com/javenwang/jasmine into javenwang-suite-start 2014-08-06 13:24:01 -07:00
slackersoft 2c23d35b03 Merge branch 'javenwang-disabled-suite' 2014-08-06 13:14:00 -07:00
Javen Wang 2b0be0c74b a disabled suite should call resultCallback with status being disabled
close #574
2014-08-06 13:09:44 -07:00
slackersoft b4f49db6bd Show a dot with color of pending spec when no expectations
[fix #76307802]
2014-08-04 12:48:35 -07:00
slackersoft cee3cc56e6 fix casing for jshint 2014-07-31 13:42:09 -07:00
slackersoft f2346d357f Allow mocked Date constructor to be called with a subset of full params
Fix #643 #624
2014-07-31 13:42:05 -07:00
Sheel Choksi ee09301d8d Console reporter prints out failed expectation's message
Previously, was only printing out the stack while the html reporter
would print out the message as well as the stack. Now they should be
more consistent.

As noticed by @despairblue in #638
2014-07-27 18:31:47 -07:00
Davis W. Frank 760b50d969 Adding NPM instructions 2014-07-21 13:56:15 -07:00
Davis W. Frank 773b15e450 Fixed typo in 2.0.1.md 2014-07-21 13:24:10 -07:00
Davis W. Frank 227698f5fa Updating source and standalone distribution to 2.0.1 v2.0.1 2014-07-21 12:36:24 -07:00
Davis W. Frank ff1fa6a893 Updating version to 2.0.1 2014-07-21 12:35:34 -07:00
Davis W. Frank ba1f8bc036 Merge branch 'master' of https://github.com/pivotal/jasmine 2014-07-21 12:33:42 -07:00
Davis W. Frank a5be51f912 First cut at 2.0.1 release notes 2014-07-21 12:33:39 -07:00
Rajan Agaskar d64ed6ebe9 Merge pull request #632 from kissrobber/bug_fix
Fixes incorrect use of signature args

- Not currently an issue, since always called with '2', but could break unexpectedly if argSlice is used without reading the body.
2014-07-21 06:46:05 -07:00
kissrobber 062dc6b15a fix a potential bug 2014-07-21 00:35:33 +09:00
slackersoft 33641578e6 update release doc to use github releases 2014-07-18 14:27:18 -07:00
slackersoft a1c109ea17 Contains is explicitly false if actual is undefined or null
Fix #627
2014-07-18 13:18:22 -07:00
slackersoft 62212bbfa4 use released jasmine selenium runner 2014-07-18 13:07:11 -07:00
Rajan Agaskar 6a89d084f4 Merge pull request #621 from bengrunfeld/docs-installation
Add installation instructions to README
2014-07-07 12:56:32 -07:00
bengrunfeld 013c4f725f Add Ruby Gem and Python Egg to docs 2014-07-07 10:11:13 -06:00
bengrunfeld c064488192 Add installation instructions to README 2014-07-07 09:37:44 -06:00
Sheel Choksi f20df57607 Keeping jasmine_selenium_runner in Gemfile only for now 2014-06-28 18:09:41 -07:00
Sheel Choksi 48f7a5f17b Point to head of jasmine_selenium_runner
jasmine_selenium_runner on master now has a fix for printing circular
objects which is needed since Jasmine has some circular objects that are
included now that we return passedExpectations (but was a bug with
    failedExpectations anyways)
2014-06-28 17:59:29 -07:00
Sheel Choksi f7ff47706c Remove 'empty' as an option as a spec result
- Having the 'empty' state for a spec result can be considered a
breaking change to the reporter interface
- Instead, we determine if a spec has no expectations using the added
key of 'passedExpectations' in combination of the 'failedExpectations'
to determine that there a spec is 'empty'

[fixes #73741032]
2014-06-27 23:50:28 -07:00