Compare commits

...

1795 Commits

Author SHA1 Message Date
Steve Gravrock
7978ad9889 Fix fn names in release notes 2025-08-30 13:38:28 -07:00
Steve Gravrock
af4662ad31 Bump version to 5.10.0 2025-08-30 13:36:12 -07:00
Steve Gravrock
15c38c7728 Add Firefox 140 (current ESR) to supported browsers and demote 128 to best-effort 2025-08-30 13:31:54 -07:00
Steve Gravrock
b597975c7e Fix and enable pending async expectation message spec 2025-08-30 13:02:08 -07:00
Steve Gravrock
09ce3a30b6 Pend environment-specific specs rather than passing 2025-08-30 12:58:04 -07:00
Steve Gravrock
3bcbc2e3af Tweak spec duration margin 2025-08-30 12:37:15 -07:00
Steve Gravrock
fbaba902dc Merge branch 'bonkevin-html-reporter-with-duration'
* Merges #2073 from @bonkevin
* Adds spec duration to HTML reporter
2025-08-30 12:35:54 -07:00
Steve Gravrock
bf2e8e759e Merge branch 'bonkevin-spec-suite-properties-accessors'
* Merges #2072 from @bonkevin
* Adds Env#getSpecProperty
2025-08-30 12:31:40 -07:00
Steve Gravrock
50e566bd67 Move beforeAll failure reporting into TreeRunner 2025-08-30 07:42:29 -07:00
Steve Gravrock
4b7d5e3623 Update and move remaining disabled Runner specs 2025-08-30 07:21:29 -07:00
Steve Gravrock
6449832e7e rm redundant and long-disabled test for toEqual with DOM nodes 2025-08-29 06:57:32 -07:00
Kevin Bon
c6266b24b7 add test 2025-08-27 10:10:45 -04:00
bonkevin
f16b81d4ef feat: html-reporter with spec duration 2025-08-27 09:58:11 -04:00
kbon
7feec406d9 set the right spec property key 2025-08-25 23:12:29 -04:00
kbon
f822ffea21 feat(getSpecProperty) get a user-defined property 2025-08-25 23:00:06 -04:00
Steve Gravrock
db65c3b131 Fold TreeRunner#runQueueWithSkipPolicy into caller 2025-08-25 18:43:54 -07:00
Steve Gravrock
fd37a7eac0 Move/update/remove obsolste disabled TreeProcessor specs 2025-08-25 18:37:31 -07:00
Steve Gravrock
12219e80c1 Move spec execution from Spec to TreeRunner 2025-08-24 14:05:22 -07:00
Steve Gravrock
a980ae6bf2 Extract spec state management out of Spec#execute 2025-08-24 14:05:22 -07:00
Steve Gravrock
56ac8f5505 Refactor TreeRunner specs 2025-08-24 14:05:13 -07:00
Steve Gravrock
3780fe0b35 Convert some TreeRunner internals to promises 2025-08-24 14:04:47 -07:00
Steve Gravrock
164a393932 Move spec begin and end handling from Env/SuiteBuilder to TreeRunner 2025-08-23 09:03:57 -07:00
Steve Gravrock
759a867094 Backfill unit tests for spec autoCleanClosures 2025-08-23 09:03:57 -07:00
Steve Gravrock
f94d0ceda9 Validate queueableFns 2025-08-23 09:03:38 -07:00
Steve Gravrock
8d99f27be8 Throw an Error rather than a string when createSpyObj is called incorectly 2025-08-23 08:19:11 -07:00
Steve Gravrock
63774597f0 Extract tree running out into a separate class 2025-08-18 16:50:04 -07:00
Steve Gravrock
a3e1abfa12 Split the resulting execution tree out from TreeProcessor 2025-08-17 11:44:52 -07:00
Steve Gravrock
b89a870a59 Test TreeProcessor's public interface, not internal state 2025-08-17 11:44:37 -07:00
Steve Gravrock
ea3fc88803 Remove mutual recursion between Runner and TreeProcessor 2025-08-17 11:44:36 -07:00
Steve Gravrock
d5884e33c6 Move suite execution and spec queueRunner building from TreeProcesor to Runner
This:
* Sets the stage for getting suite and spec execution in one place
* Greatly simplifies the interaction between Runner and TreeProcessor
* Focuses TreeProcessor more on building execution trees
2025-08-17 11:43:00 -07:00
Steve Gravrock
138bf9be4b Focused integration tests for Runner and TreeProcessor
These are mostly adaptations of the execution tests from TreeProcessorSpec.js.
They are meant to support refactoring of the interface and responsibility
division between Runner and TreeProcessor. All these scenarios are probably
covered by nearly-end-to-end integration tests, but those are more difficult
to debug.
2025-08-17 09:23:29 -07:00
Steve Gravrock
98d5284c19 Check for and silence suite reentry warnings in Jasmine's own tests 2025-08-15 06:58:08 -07:00
Steve Gravrock
2299c85751 Deprecate spec/suite orders that interleave suites 2025-08-13 19:02:36 -07:00
Steve Gravrock
8e3ec25f6d Move invalid order exception throw into TreeProcessor 2025-08-13 18:30:51 -07:00
Steve Gravrock
b009cd2922 Convert TreeProcessor to a class 2025-08-12 18:23:57 -07:00
Steve Gravrock
8eee6ebb91 Runner: naming improvements, use private members 2025-08-11 23:22:07 -07:00
Steve Gravrock
c15a1aaa6d Rename queueRunnerFactory to runQueue throughout 2025-08-11 23:05:56 -07:00
Steve Gravrock
5b06531cac Prevent GloablErrors from being monkey patched
All current shipped versions of zone.js contain a monkey patch that fails
to pass constructor arguments on to GlobalErrors. That would crash Jasmine
if it was applied early enough to have any effect.

See <https://github.com/angular/angular/issues/63072>.
2025-08-11 18:08:47 -07:00
Steve Gravrock
42cca93926 Minor jsdoc cleanup 2025-08-09 08:35:49 -07:00
Steve Gravrock
395ef85954 Optionally detect late promise rejections and don't report them as errors 2025-08-09 08:35:08 -07:00
Steve Gravrock
5e88fde655 Backfill some unit tests for Runner's interaction with TreeProcessor 2025-07-29 09:59:45 -07:00
Steve Gravrock
bb777e93e5 Bump version to 5.9.0 2025-07-19 08:27:17 -07:00
Steve Gravrock
9d3fb167a2 Document that the filename property of suite and spec results is deprecated
See <https://github.com/jasmine/jasmine/issues/2065>.
2025-07-19 06:54:54 -07:00
Steve Gravrock
3176eaf1d8 Merge branch 'idConflict' of https://github.com/atscott/jasmine
* Avoid generating timers with IDs that conflict with native
* Fixes #2068
* Merges #2069 from @atscott
2025-07-15 16:50:57 -07:00
Andrew Scott
d31a431d1f fix(clock): Avoid generating timers with IDs that conflict with native
This commit attempts to ensure that the timers created by jasmine mock
clock do not conflict with the native timers. This also retains
pre-existing behavior whereby a native scheduled function cannot be
cleared if it was created prior to the mock clock being installed
(unless the mock clock is uninstalled first).

Prior to this commit, attempting to clear a native timer would result in
clearing a mocked scheduled function instead, in some scenarios where
the IDs conflicted.

fixes #2068
2025-07-14 16:55:05 -07:00
Steve Gravrock
84f78c1435 Split GlobalErrors into portable and platform-specific parts 2025-07-12 13:59:19 -07:00
Steve Gravrock
ff476b1982 Unify error dispatching between browser and node 2025-07-12 13:56:58 -07:00
Steve Gravrock
d53d2ff3eb Convert GlobalErrors to an ES6 class 2025-07-12 13:56:50 -07:00
Steve Gravrock
adfbd00c75 Refactor mocking in GlobalErrorsSpec 2025-07-12 13:56:48 -07:00
Steve Gravrock
495e5fcd50 Backfill integration tests for unhandled promise rejections 2025-07-11 21:36:30 -07:00
Steve Gravrock
bc2aa7be25 Start breaking up integration/EnvSpec.js 2025-07-11 07:39:39 -07:00
Steve Gravrock
af04599bb5 Relaxed timeout on flaky test 2025-07-09 06:56:08 -07:00
Steve Gravrock
21db6ec0e3 Removed unnecessary errorWithStack helper 2025-06-22 12:49:26 -07:00
Steve Gravrock
2d07b3e6d7 Removed protections against user code redefining undefined
Jasmine hasn't even run on platforms that allowed redefining undefined
since 2.x.
2025-06-22 12:23:18 -07:00
Steve Gravrock
6891789ed2 Don't test on Node versions before 18.20.5
18.20.5 is the oldest version supported by current selenium-webdriver.
Also, many dev dependencies require at least 18.18.0.
2025-06-14 10:22:03 -07:00
Steve Gravrock
7a3d3c9360 Removed shelljs dev dependency 2025-06-14 09:05:12 -07:00
Steve Gravrock
1b2922e008 Don't hardcode temp dir in buildStandaloneDist 2025-06-14 09:05:12 -07:00
Steve Gravrock
bd8d23f2a7 Removed rimraf dev dependency 2025-06-14 09:05:06 -07:00
Steve Gravrock
de26763868 CI: remove special case for Chrome 2025-06-09 15:05:50 -07:00
Steve Gravrock
f4be08b657 Bump version to 5.8.0 2025-06-06 17:34:09 -07:00
Steve Gravrock
50ef882a1a Merge branch 'gh1886-spy-args-deep-clone' of https://github.com/evanwalsh/jasmine
Merges #2062 from @evanwaslh
Fixes #1886
2025-06-05 06:54:37 -07:00
Steve Gravrock
c1cd5c6291 Use custom object formatters in spy strategy mismatch errors 2025-06-05 05:46:29 -07:00
Steve Gravrock
63ed2b3948 Include function names in pretty printer output
This helps make matcher errors and spy strategy mismatch errors easier
to understand in cases where the difference involves expecting one
function but getting a different one.
2025-06-04 18:37:44 -07:00
Steve Gravrock
0183acc682 Fix diff building when only one side has a custom object formatter
Fixes #2061
2025-06-04 18:04:40 -07:00
Steve Gravrock
e15819c0dd Test aginast Node 24 2025-05-27 17:32:39 -07:00
Evan Walsh
f694194b2b Allow passing a function to saveArgumentsByValue to customize how arguments are saved
For instance, pass `structuredClone` to do a deep clone.

Fixes https://github.com/jasmine/jasmine/issues/1886
2025-05-27 15:43:21 -04:00
Steve Gravrock
94c00886a6 Merge branch 'setimmedate' of https://github.com/atscott/jasmine
Merges #2058 from @atscott
2025-05-03 10:00:41 -07:00
Steve Gravrock
f5915d7963 Bump version to 5.7.1 2025-05-01 19:31:30 -07:00
Steve Gravrock
15587f3ce3 Merge branch 'autotickuninstall' of https://github.com/atscott/jasmine
Merges #2057 from @atscott
2025-05-01 16:46:30 -07:00
Andrew Scott
3ecddc2555 fixup! fix(Clock): Ensure that uninstalling the clock also stops auto tick 2025-05-01 10:25:24 -07:00
Andrew Scott
6a7c0e6368 perf(clock): use setImmediate for autoTick macrotask in Node
When called within an I/O cycle, `setImmediate` is generally faster because it
is designed to execute immediately after the current I/O event completes,
whereas `setTimeout(0)` gets placed in the timers queue and might be subject to delays.

> The main advantage to using setImmediate() over setTimeout() is setImmediate()
> will always be executed before any timers if scheduled within an I/O cycle,
> independently of how many timers are present.

* https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick#setimmediate-vs-settimeout
* https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick#poll
* https://nodejs.org/en/learn/asynchronous-work/understanding-setimmediate
2025-04-30 14:10:39 -07:00
Andrew Scott
84daa0f5dc fix(Clock): Ensure that uninstalling the clock also stops auto tick
The autotick feature mistakenly does not account for the clock being a
singleton and the re-installation of the clock causes the auto ticking
exit conditions to become true again, before it has a chance to break.
2025-04-30 13:38:10 -07:00
Steve Gravrock
c6b3e947e9 Fixed errors in 5.7.0 release notes 2025-04-29 07:28:36 -07:00
Steve Gravrock
0e604de0db Bump version to 5.7.0 2025-04-26 09:29:07 -07:00
Steve Gravrock
e7ca9c5765 Built distribution 2025-04-26 09:28:21 -07:00
Steve Gravrock
cbff6f95cb Fixed autoTick jsdoc 2025-04-26 08:27:12 -07:00
Steve Gravrock
361640f52e Document that SpecResult#filename and SuiteResult#filename are wrong in some common scenarios
See:

* https://github.com/jasmine/jasmine/issues/2016
* https://github.com/jasmine/jasmine/issues/1884
2025-04-26 07:38:28 -07:00
Steve Gravrock
e5d46e8624 Expose spec path as an array of names
This is in addition to the existing concatenated name. It's meant to
support tools like IDE integrations that want to be able to filter a
run to an exact set of suites/specs.
2025-04-12 09:49:35 -07:00
Steve Gravrock
8f6b3c49cc Removed flaky test
It doesn't look like there's a reliable way to test setTimeout throttling
prevention. The underlying behavior is too nondeterministic. This test
failed at a significant rate in browsers where throttling prevention worked,
simply due to setTimeout taking longer than expected (e.g. 130ms for the
entire test vs an expected <= 5oms). When run in Safari, where setTimeout
throttling prevention doesn't work, it would incorrectly pass if run early
enough in the test order. This is presumably because setTimeout throttling
is influenced by the setTimeout calls made by Jasmine itself prior to
running the test.
2025-04-12 08:28:15 -07:00
Steve Gravrock
df6ab05280 Merge pull request #2056 from jasmine/fix-readme-image
Update README header image
2025-04-11 12:11:06 -07:00
Steve Gravrock
9ea027dbff Update README header image
* Work around GitHub's broken rendering of rawgithub.com images
* Add alt text
* Remove unnecessary docs link
2025-04-11 12:10:25 -07:00
Steve Gravrock
7cc7da4abc Merge branch 'degrunt' 2025-04-10 18:36:21 -07:00
Steve Gravrock
8be98e73ca Use published css-url-embed 2025-04-10 18:27:55 -07:00
Steve Gravrock
52aaf63d22 Create the dist dir if it doesn't already exist 2025-04-10 18:27:55 -07:00
Steve Gravrock
a09fdd3284 Removed remaining use of Grunt 2025-04-09 09:11:19 -07:00
Steve Gravrock
89f3e9449d Use ejs to build SpecRunner.html 2025-04-08 21:53:05 -07:00
Steve Gravrock
ba033c520d Use sass directly rather than grunt-sass 2025-04-08 21:27:43 -07:00
Steve Gravrock
fc935e89c6 Removed grunt-contrib-concat 2025-04-08 21:08:45 -07:00
Steve Gravrock
4bd2feda7d Use archiver directly rather than grunt-contrib-compress
Removes two old copies of glob and is another step towards removing Grunt.
2025-04-08 18:48:58 -07:00
Steve Gravrock
bcf699f145 Switch from grunt-css-url-embed to css-url-embed
This eliminates some rickety indirect dependencies and is a big step
towards removing Grunt.
2025-04-08 18:00:55 -07:00
Steve Gravrock
d4f29491c9 Removed old eslint config file 2025-04-08 07:46:50 -07:00
Steve Gravrock
5b1c932f89 Built distribution 2025-04-07 22:07:52 -07:00
Steve Gravrock
7a8d6e44e3 Fixed sass deprecation warning 2025-04-07 21:59:56 -07:00
Steve Gravrock
dac349397e Updated grunt-sass 2025-04-07 21:59:14 -07:00
Steve Gravrock
5ff7e7f9a1 Updated to eslint 9
This isn't officially compatible with the oldest version of Node that
Jasmine supports, but it works. If it stops working, we can always disable
linting in CI builds on older Node versions.
2025-04-07 21:39:58 -07:00
Steve Gravrock
7b2ab822c6 Removed mostly-unmaintained dev dependency 'temp'
temp has seen some recent maintainer activity but there haven't been
any commits since 2021 and PRs have gone un-addressed for years. It's
one of the dev dependencies that depends on very old versions of rimraf.
2025-04-07 21:35:36 -07:00
Steve Gravrock
033260300a Upgrade shelljs 2025-04-07 21:35:36 -07:00
Steve Gravrock
cb66b54f8b Upgraded jsdom 2025-04-07 21:35:36 -07:00
Steve Gravrock
f4a8102a80 Merge pull request #2055 from atscott/throttleTest
Fix throttling test unit conversion bug and disable test in Node
2025-04-07 21:31:54 -07:00
Andrew Scott
8f539f17b2 refactor(Clock): Fix throttling test unit conversion bug
* fixes the throttling timeout test which incorrectly converted
from milliseconds to seconds before making an assertion expecting
milliseconds.
* reduces number of timeouts from 2000 to 100, which is still more than enough
to observe throttling (or lackthereof).
* Omits Node from the test since it does not throttle timeouts
2025-04-07 08:37:26 -07:00
Steve Gravrock
e5c543a0a1 Updated bug report template
* Don't separately ask for code and steps to reproduce. They're usually
  the same.
* Require steps to reproduce, don't just recommend them
2025-03-21 10:46:45 -07:00
Steve Gravrock
7d697faf95 Merge branch 'atscott-autoTick'
* Merges #2042 from @atscott
* Fixes #1932
* Fixes #1725
2025-03-21 09:21:14 -07:00
Steve Gravrock
6f23151a5e Hardened stop-sauce-connect 2025-03-17 17:33:34 -07:00
Steve Gravrock
e53c7ed8d1 Update to Sauce Connect 5 2025-03-16 14:34:36 -07:00
Andrew Scott
dcd44a0edf feat(Clock): Add ability to automatically tick the clock asynchronously
Testing with mock clocks can often turn into a real struggle when
dealing with situations where some work in the test is truly async and
other work is captured by the mock clock. This can happen for many
reasons, but as one example:

An asynchonrous change from a task in the mocked clock may change DOM where
a resize observer then gets triggered. This browser API is truly asynchronous
and would require the user to wait real time for it to fire. If there is
follow-up work after the resize observer fires, it may be captured by the mock
clock again. This would require the tester to write something like the
following:

```
// flush the timer
jasmine.clock().tick();
// wait for resize observer
await new Promise(resolve => setTimeout(resolve));
// flush follow-up work from the resize observer callback
jasmine.clock().tick();
```

When using mock clocks, testers are always forced to write tests with intimate
knowledge of when the mock clock needs to be ticked. Oftentimes, the
purpose of using a mock clock is to speed up the execution time of the
test when there are timeouts involved. It is not often a goal to test
the exact timeout values. This can cause tests to be riddled with
`tick`. It ideal for test code to be written in a way
that is independent of whether a mock clock is installed. For example:

```
document.getElementById('submit');
// https://testing-library.com/docs/dom-testing-library/api-async/#waitfor
await waitFor(() => expect(mockAPI).toHaveBeenCalledTimes(1))
```

When mock clocks are involved, the above may not be possible if there is
some delay involved between the click and the request to the API.
Instead, developers would need to manually tick the clock beyond the
delay to trigger the API call.

This commit attempts to resolve these issues by adding a feature to the
clock which allows it to advance on its own with the passage of time,
just as clocks do without mocks installed. It also allows for some
breathing time so any unmocked micro and macrotasks are given space to
execute as well.

This feature would also address both #1725 and #1932. `asyncTick` can be
accomplished by enabling the auto tick feature and then waiting for a
promise with a timout to be resolved
(`await new Promise(resolve => setTimeout(resolve, 20))`) where
`setTimeout` is captured by the mock clock and flushed while the code is
waiting for the promise to resolve.

resolves #1725
resolves #1932

All credit goes to @stephenfarrar for this.
2025-03-10 15:31:32 -07:00
Steve Gravrock
f0a5ea9d0f Updated docs for expected and actual properties of expectation results 2025-02-17 12:07:32 -08:00
Steve Gravrock
491b513aa3 Debug logs for rare TypedArray comparison failures in Firefox 2025-02-16 20:30:47 -08:00
Steve Gravrock
d5872bba66 Fixed Safari footnotes in release notes 2025-02-08 11:13:28 -08:00
Steve Gravrock
c4f4edda1b Bump version to 5.6.0 2025-02-08 11:10:06 -08:00
Steve Gravrock
cf057b6631 Fixed parse error from jsdoc
"arguments" isn't a legal argument name in strict mode JS. The JS
runtimes that Jasmine runs in allow it, but jsdoc doesn't.
2025-02-08 10:25:41 -08:00
Steve Gravrock
2a7a157713 toHaveNoOtherSpyInteractions message tweaks 2025-01-20 11:31:47 -08:00
Steve Gravrock
7463fe511b Match messages exactly in toHaveNoOtherSpyInteractions specs 2025-01-20 11:31:18 -08:00
Steve Gravrock
1b724daa10 Merge branch 'Eradev-issue-1991'
* Merges #2051 from @Eradev
* Fixes #1991
2025-01-20 11:31:06 -08:00
Eradev
888d3b6250 Modified error message 2025-01-18 17:55:00 -05:00
Eradev
289afbf0a6 Remove jsdoc from unverifiedCount 2025-01-18 17:25:07 -05:00
Steve Gravrock
9b89bee4f5 Demote Safari to best-effort support 2025-01-18 11:31:17 -08:00
Eradev
3f8f488a58 Fix broken tests 2025-01-11 12:41:28 -05:00
Steve Gravrock
592d47e971 Update copyright date 2025-01-11 08:33:37 -08:00
Eradev
4732012f1c toHaveNoOtherSpyInteractions implementation 2025-01-10 21:05:12 -05:00
Steve Gravrock
7683325d68 Improved specs for async matcher error messages 2024-12-31 10:10:40 -08:00
Steve Gravrock
03d665e243 Merge branch 'improve_toBeRejectedWithError' of https://github.com/andiz2/jasmine 2024-12-31 10:07:53 -08:00
Andrei D
a1591da25d improved error msg on toBeRehectedWithError and all other built-in async matchers 2024-12-22 17:43:47 +02:00
Steve Gravrock
1f1e1209d2 Merge branch 'add_toBeNullish' of https://github.com/MattMcCherry/jasmine
* Merges #2045 from @MattMcCherry
2024-12-12 17:30:55 -08:00
Steve Gravrock
a389905a38 Merge branch 'feature/matcher-toHaveClasses' of https://github.com/aYorky/jasmine
* Merges #2046 from @aYorky
2024-12-11 19:19:58 -08:00
Matt McCherry
36dd6b07d1 add integration test for a falsy value 2024-12-10 11:39:44 +00:00
Matt McCherry
2f3689713b add tests for falsy values 2024-12-10 11:31:16 +00:00
Alex Yorkovich
819fab7b58 simplified match condition 2024-12-07 13:14:25 -06:00
Steve Gravrock
e5ca1f37f1 Use discussions for support requests, not issues 2024-12-07 09:32:57 -08:00
Alex Yorkovich
c3650ea7c7 updated release number 2024-12-04 12:34:36 -06:00
Alex Yorkovich
1805337424 Added new toHaveClasses matcher; tests included 2024-12-04 12:20:15 -06:00
Matt McCherry
27bb6ebac1 reset jasmine.js 2024-12-02 10:34:55 +00:00
Matt McCherry
580323c221 run prettier and fix tests 2024-12-02 10:34:55 +00:00
Matt McCherry
d9286c549f add integration test for toBeNullish 2024-12-02 10:34:55 +00:00
Matt McCherry
26dfa6d257 Add .toBeNullish matcher 2024-12-02 10:34:49 +00:00
Steve Gravrock
483d4ab3c3 Bump version to 5.5.0 2024-11-23 10:58:56 -08:00
Steve Gravrock
663dfe5932 Updated release instructions 2024-11-23 10:42:20 -08:00
Steve Gravrock
ce9c752899 Added debug logging to flaky test 2024-11-12 20:25:20 -08:00
Steve Gravrock
d5e7bc9fd6 Optionally enforce uniqueness of spec and suite names
This is off by default for backwards compatibility but can be enabled
by setting the forbidDuplicateNames env config property to true.

Fixes #1633.
2024-11-10 09:54:51 -08:00
Steve Gravrock
744e765d6f Update copyright date 2024-11-09 13:37:46 -08:00
Steve Gravrock
29551ba4f3 Prettier 2024-11-09 13:17:32 -08:00
Steve Gravrock
bd9a3b2305 Include property value mismatches in diffs even when there are missing or extra properties 2024-11-09 11:22:27 -08:00
Steve Gravrock
c8c3325b56 Bump version to 5.4.0 2024-10-12 10:31:35 -07:00
Steve Gravrock
84c7e2b21b Fixed de-duplication of exception messages containing blank lines on Node and Chrome
This is particularly helpful when reporting testing-library errors, which
have messages that contain blank lines and can be hundreds or even thousands
of lines long.
2024-10-07 20:04:07 -07:00
Steve Gravrock
dda25bb29e Removed references to PhantomJS from StackTraceSpec.js 2024-10-07 19:55:34 -07:00
Steve Gravrock
9ccf2ef96b Also deprecate the expected and actual properties of ThrowUnlessFailure 2024-10-05 13:55:49 -07:00
Steve Gravrock
c6fa55bfc8 Clarify support status of old Firefox ESRs 2024-10-05 13:46:49 -07:00
Steve Gravrock
06bcf1c2e1 Fixed broken docs link 2024-10-05 13:38:52 -07:00
Steve Gravrock
40f402d117 Deprecate the expected and actual properties of expectation results 2024-10-04 07:54:20 -07:00
Steve Gravrock
71f6a95ce5 Added Firefox 128 (current ESR) to supported browsers 2024-09-24 06:54:36 -07:00
Steve Gravrock
5cd7d47f72 Bump version to 5.3.0 2024-09-07 13:18:21 -07:00
Steve Gravrock
d0fe5c4712 Require curly braces around loop and conditonal bodies 2024-09-02 11:30:36 -07:00
Steve Gravrock
f602c4911c Merge branch 'dave-unclamp-safari' of https://github.com/dcsaszar/jasmine
* Significantly improves performance in Safari
* Merges #2040 from @dcsaszar
* Fixes #2008
2024-09-02 11:22:56 -07:00
Steve Gravrock
7aaf7eaf30 API reference for reporter capabilities 2024-09-02 10:53:56 -07:00
David Császár
35f16e8125 Add test for unclamping setTimeout in Safari 2024-09-01 10:22:16 +02:00
David Császár
acc777c267 Unclamp setTimeout in Safari
Fixes #2008

wrapping setTimeout in postMessage is a trade-off between
* slowdown due to postMessage (slow on Safari)
* speedup due to no setTimeout clamping (can be severe on Safari)
2024-09-01 10:21:57 +02:00
David Császár
1c74356691 Add unclampedSetTimeout helper 2024-09-01 09:54:55 +02:00
David Császár
bbebea0fa5 Refactor: extract postMessage 2024-09-01 09:31:52 +02:00
Steve Gravrock
66eb27b0af Throw if spying has no effect
This provides a useful diagnostic in cases where assigning to a property
is a no-op, like localStorage in Firefox and Safari 17.

See #2036 and #2007.
2024-08-17 09:07:18 -07:00
Steve Gravrock
7a63c06a65 Merge branch 'webkit-performance' of https://github.com/m-akinc/jasmine
* Merges #2034 from @m-akinc
2024-08-10 07:26:00 -07:00
Mert Akinc
554dfd4923 Update comments as requested 2024-08-05 12:27:11 -05:00
Mert Akinc
36a6e2aa1d Merge branch 'main' into webkit-performance 2024-08-05 12:19:53 -05:00
Steve Gravrock
3c4b73f136 Fixed globbing in own test suite when running on Windows outside of c:\Users
The previous code used path.join() to construct glob input. That should't
work, but it did as long as the working directory was under c:\Users.
2024-08-03 18:06:20 -07:00
Mert Akinc
bc3ed74336 Formatting fix 2024-07-26 17:54:04 -05:00
Mert Akinc
97b6f33cc2 Add test, update rexex pattern and constant name 2024-07-26 17:45:23 -05:00
Mert Akinc
a9889ddb31 Improve performance on Playwright Windows WebKit 2024-07-25 09:54:32 -05:00
Steve Gravrock
cd1b7ce9c7 Bump version to 5.2.0 2024-07-20 08:44:53 -07:00
Steve Gravrock
3653d6e0ef Moved eslint and prettier configs out of package.json 2024-07-18 07:17:31 -07:00
Steve Gravrock
c3387f8dbf Merge branch 'stephanreiter-better-toHaveSize'
* Merges #2033 from @stephanreiter
2024-07-13 14:02:15 -07:00
Steve Gravrock
3d54184c7f Docs: Improved discoverability of asymmetric equality testers 2024-07-03 10:17:57 -07:00
Stephan Ferlin-Reiter
6f23e706d7 Improve the error message of the toHaveSize matcher.
We include the size of the thing that didn't meet the size expectation.
2024-07-02 20:28:16 +00:00
Steve Gravrock
cc69edf92c Fixed stack trace filtering in FF when the developer tools are open 2024-06-22 11:49:49 -07:00
Steve Gravrock
ba7560f65e HTML reporter: show debug logs with white-space: pre 2024-06-22 11:44:11 -07:00
Steve Gravrock
c3960c4a96 Test against Node 22 2024-06-18 18:13:51 -07:00
Steve Gravrock
5c21f94bb1 4.6.1 release notes 2024-05-25 10:24:11 -07:00
Steve Gravrock
8cd7c94490 Added a jsdoc example for withContext()
Fixes jasmine/jasmine.github.io#166
2024-04-16 16:22:25 -07:00
Steve Gravrock
6a6fa7b29a Tests for existing handling of non-Error global errors in Node 2024-03-22 09:15:22 -07:00
Steve Gravrock
4984548cab Clarify argument to spyOnGlobalErrorsAsync's spy 2024-03-22 08:53:19 -07:00
Steve Gravrock
6941bde7e2 Revert "Deprecate the suppressLoadErrors option"
jasmine-npm still needs this to enable the default behavior of crashing
with a stack trace on load errors.

This reverts commit 99e350ac85.
2024-03-21 09:34:26 -07:00
Steve Gravrock
1504f25ced Report the message when a browser error event with a message but no error occurs 2024-03-21 09:15:43 -07:00
Steve Gravrock
99e350ac85 Deprecate the suppressLoadErrors option
This was intended as a 3.0 migration aid for browser users who had
dependencies that triggered errors at load time. However, it was never
documented and never supported by jasmine-brower-runner, karma, or any
other commonly used tool for runing Jasmine in the browser. There is
no evidence of it actually being used. It is, however, starting to
show up in machine-generated "tutorials".
2024-03-04 19:35:31 -08:00
Steve Gravrock
1624b07589 Clarify spyOnGlobalErrorsAsync API docs 2024-03-04 19:35:24 -08:00
Steve Gravrock
d06dce4614 Bump version to 5.1.2 2024-02-08 17:22:46 -08:00
Steve Gravrock
03098e81f8 Fixed throwUnlessAsync
Fixes #2026
2024-02-05 18:49:19 -08:00
Steve Gravrock
726c152f6e Added Safari 17 to supported browsers 2024-02-05 18:44:11 -08:00
Steve Gravrock
409d2e29e5 Fixed formatting of copyright notice in README 2023-10-14 17:38:30 -07:00
Steve Gravrock
01e2bd5050 Updated copyright notices
The Pivotal copyright notice needs to be retained. That's the right
thing to do and the MIT license requires it. However, using it by itself
becomes more obviously incorrect with each passing year since Pivotal
ceased to exist. Moreover, Pivotal hasn't actually been the sole
copyright owner since the first external contribution was merged.
Contributors were not asked to sign a copyright assignment, so they
retain copyright to their contributions.

"Copyright (c) 2008-2019 Pivotal Labs" complies with the terms of the
license and acknowledges Pivotal's outsized role in developing Jasmine.
"Copyright (c) 2008-$YEAR The Jasmine developers" acknowledges all
authors and will remain correct in the future.
2023-10-14 08:55:48 -07:00
Steve Gravrock
96033e38ea Merge branch 'main' of https://github.com/jd-apprentice/jasmine
* Merges #2017 from @jd-apprentice
2023-10-07 10:34:06 -07:00
Steve Gravrock
ed75290ef7 Removed badges from README
The CI status badge mostly just shows whether Saucelabas was flaky
last night. Code Triage was a nice idea but it's attracted at most
one new contributor over 5.5 years.
2023-09-30 10:22:37 -07:00
Steve Gravrock
a14dbf012a Fix Chrome on CI 2023-09-30 08:33:27 -07:00
Jonathan
17c11ba7b9 fix: updated remaining files 2023-09-21 11:48:52 -03:00
Jonathan
2a1daca1ca chore: rename license file 2023-09-19 14:41:21 -03:00
Steve Gravrock
f0db5ce350 Added Firefox 115 (current ESR) to supported browsers 2023-09-07 21:43:24 -07:00
Steve Gravrock
39f9c2e1a0 Don't attach spec helpers to the env 2023-08-26 11:52:26 -07:00
Steve Gravrock
bff612a169 Bump version to 5.1.1 2023-08-24 19:00:26 -07:00
Steve Gravrock
4ba42f3746 Fixed global variable leak when using ParallelReportDispatcher 2023-08-22 19:34:22 -07:00
Steve Gravrock
58bee05c36 Documented usage of eval in DelayedFunctionScheduler 2023-08-22 19:28:20 -07:00
Steve Gravrock
c1871b0f0c Removed unnecessary throw when building stack trace
Since 4.0, all supported JS runtimes populate the stack property of
Error objects when the Error is instantiated, not when it's thrown.
2023-08-19 09:54:03 -07:00
Steve Gravrock
c16974b091 Improved jsdocs for originalFn argument to createSpy
Fixes jasmine.github.io#137.
2023-08-14 18:32:51 -07:00
Steve Gravrock
bfedda9764 Link to 5.0 upgrade guide in README, not 4.0 2023-08-12 17:26:39 -07:00
Steve Gravrock
a67b7276be Fixed jsdocs for throwUnless and throwUnlessAsync 2023-07-22 09:36:16 -07:00
Steve Gravrock
47f3105ef0 Bump version to 5.1.0 2023-07-22 09:12:36 -07:00
Steve Gravrock
aeb56539c9 Built distribution 2023-07-22 09:12:18 -07:00
Steve Gravrock
75d45efa16 Exclude inherited Error properties from stack trace
These are likely to be methods or other things that aren't meaningful in
Jasmine's output.
2023-07-19 19:13:24 -07:00
Steve Gravrock
59d1c5bebb Use "bug report" tag, not "unconfirmed bug" 2023-07-19 18:29:51 -07:00
Steve Gravrock
040983c979 Merge branch 'skip-non-error-cause' of https://github.com/angrycat9000/jasmine
* Merges #2013 from @angrycat9000
* Fixes #2011
2023-07-19 18:28:56 -07:00
angrycat9000
2ddb344bac Skip parsing cause if it is not an Error object 2023-07-19 10:00:50 -04:00
Steve Gravrock
e56bd3918b Added throwUnless and throwUnlessAsync
These are similar to `expect` and `expectAsync` except that they throw
exceptions rather than recording matcher failures as spec/suite failures.
They're intended to support using Jasmine matchers in testing-library's
`waitFor`, and also provide a way to integration-test custom matchers.

These funtions are not equivalent to `expect` and `expectAsync` and should
not be used in situations where you want a matcher failure to reliably fail
the spec. Whether that happens depends on the structure of the surrounding
code. In general, you should only use `throwUnless` when you expect
something (which could be your own code or library code like `waitFor`) to
catch the resulting exception.

Fixes #2003.
Fixes #1980.
2023-07-15 12:08:11 -07:00
Steve Gravrock
59600a1c29 Removed expect/expectAsync indirection through spec/suite 2023-07-15 12:08:11 -07:00
Steve Gravrock
f8e4ea868f CI: Use a globally-unique Sauce tunnel ID
CIRCLE_BUILD_NUM is only unique per-repo, and we have multiple repos
that can concurrently run Sauce builds.
2023-07-01 11:05:04 -07:00
Steve Gravrock
0ff56c53b1 Dogfood remote Selenium grid support 2023-07-01 10:17:05 -07:00
Steve Gravrock
b617d983de Bump version to 5.0.1 2023-06-09 16:24:00 -07:00
Steve Gravrock
8e0f0e8e8c Optionally restore the pre-5.0 behavior of boot() always creating a new instance
This is needed by jasmine-npm (and likely other tools like it) that may
need to create and use multiple envs in sequence.
2023-06-05 19:44:06 -07:00
Steve Gravrock
d745d6b5f0 Bump version to 5.0.0 2023-05-13 15:14:53 -07:00
Steve Gravrock
fc2c2a477d Updated most dev dependencies
Not updating Prettier because newer versions impose significant formatting
changes. In particular, 2.0 changes every function definition from
`function() {` to `function () {` with no way to opt out. I'm not willing
to accept that kind of churn just becuse the Prettier devs changed their
mind about what color the bikeshed should be.

We'll most likely stay on Prettier 1.17 for as long as it remains viable,
then either switch to an autoformatter that offers stability or just
remove it.
2023-05-13 12:03:45 -07:00
Steve Gravrock
ff93277c0f Accessibility: Always provide a non-color indication that a spec is pending 2023-04-29 11:45:21 -07:00
Steve Gravrock
90741b3cee Accessibility: Improved contrast of version number and inactive tab links 2023-04-29 11:45:16 -07:00
Steve Gravrock
d1de59f0ed Updated jasmine dev dependency 2023-04-29 10:53:03 -07:00
Steve Gravrock
73f8e001ad Bump version to 5.0.0-beta-0 2023-04-29 10:10:05 -07:00
Steve Gravrock
390cc45af2 Dropped support for Node 16
Node 16 will reach EOL no later than a few months after Jasmine 5 is
released. Experience with Node 12 and Node 14 has shown that our
dependencies, especially dev dependencies, move on from past-EOL Node
versions fairly quickly. That can make it difficult to continue supporting
them. Since long term support for past EOL Node versions is a non-goal and
many users expect that Node versions will only be dropped in major
releases, it's better to drop it in 5.0.
2023-04-27 19:32:18 -07:00
Steve Gravrock
33118ac6e2 Merge branch 'main' into 5.0 2023-04-27 19:22:30 -07:00
Steve Gravrock
31ff9a300c Added Node 20 to supported environments 2023-04-22 08:12:49 -07:00
Steve Gravrock
5cc739d879 Bump version to 5.0.0-alpha.1 2023-04-08 13:02:21 -07:00
Steve Gravrock
1e7f07259e API docs for parallel support things that jasmine-npm uses 2023-04-08 12:37:40 -07:00
Steve Gravrock
c36a5cfd96 Parallel: Cleaner interface for reporter dispatching
This gets jasmine-npm out of having to deal with QueueRunner, GlobalErrors,
and ReportDispatcher directly.
2023-04-08 11:41:15 -07:00
Steve Gravrock
299fd1f770 Removed unnecessary TODO 2023-03-25 11:21:04 -07:00
Steve Gravrock
656427d328 Parallel: Disallow calls to Env#config from spec and helper files
Such configuration changes only affect one worker, which is almost certainly
not the intent.
2023-03-25 11:16:54 -07:00
Steve Gravrock
621522fdd4 Updated Glob 2023-03-21 22:35:15 -07:00
Steve Gravrock
6e3589bf52 Updated most dev dependencies 2023-03-21 22:33:24 -07:00
Steve Gravrock
df2d9b282e Bump version to 5.0.0-alpha.0 2023-03-18 11:25:32 -07:00
Steve Gravrock
726d35c5c5 Merge remote-tracking branch 'origin/main' into 5.0 2023-03-15 17:53:08 -07:00
Steve Gravrock
f509078020 Bump version to 4.6.0 2023-03-15 17:21:56 -07:00
Steve Gravrock
8308515210 Ignore the number of CPUs reported by Circle CI 2023-03-12 15:31:28 -07:00
Steve Gravrock
ed838b3cbf Dropped support for Node <16.14
To match jasmine-npm.
2023-03-11 21:19:30 -08:00
Steve Gravrock
04fac300e8 Uninstall the global error at the end of env execution
jasmine-npm needs this so that it can do its own error handling during
globalTeardown.
2023-03-11 17:45:31 -08:00
Steve Gravrock
ff237f4b66 Fixed sass version pinning 2023-03-11 14:26:22 -08:00
Steve Gravrock
e42e3d9e00 Pin sass to the last version that works on Node 12 2023-03-11 14:19:16 -08:00
Steve Gravrock
61505f4c59 Fixed post-merge test failures 2023-03-04 14:10:05 -08:00
Steve Gravrock
86eddb05b4 Merge remote-tracking branch 'origin/main' into 5.0 2023-03-04 14:06:43 -08:00
Steve Gravrock
8af5509581 Added a parallel flag to the jasmineStarted reporter event 2023-03-03 20:49:10 -08:00
Steve Gravrock
166e5f4d6c Report the ID of each suite/spec's parent
This is intended to support parallel execution, which is planned for a
future release of Jasmine. Because the execution of unrelated suites will
interleave when run in parallel, reporters will not be able to assume
that the most recent `suiteStarted` event identifies the parent of the
current suite/spec. By adding this feature now, we allow reporters to
support both parallel execution and at least some 4.x versions without
having to implement two different ways of finding the parent suite.
2023-02-25 10:24:14 -08:00
Steve Gravrock
6ad8d20694 Report the path/url of the file that the spec/suite was defined in
Fixes #1884
2023-02-15 21:39:21 -08:00
Steve Gravrock
cbc03feb52 Merge branch 'main' into 5.0 2023-02-12 13:08:42 -08:00
Steve Gravrock
bc3a495160 Pin eslint-plugin-compat to <4.1.0 to fix import error on CI
See <https://github.com/amilajack/eslint-plugin-compat/issues/528>.
2023-02-07 18:46:17 -08:00
Steve Gravrock
b323631611 Pin Grunt to <1.6.0 for compatiblity with Node 12 2023-01-30 17:57:47 -08:00
Steve Gravrock
e8767ba660 Removed "Does the problem occur with the latest version of jasmine-core" from issue templates 2023-01-25 20:50:51 -08:00
Steve Gravrock
af9a4114f4 Parallel: Improved error messages for top-level before/afterAll 2022-11-25 13:13:05 -08:00
Steve Gravrock
75f97961f5 Dropped support for Safari 14 and Firefox 91 2022-11-24 13:25:39 -08:00
Steve Gravrock
25a7168286 Merge remote-tracking branch 'origin/main' into 5.0 2022-11-24 12:50:39 -08:00
Steve Gravrock
494e81f436 Document that stopOnSpecFailure is best-effort in parallel mode 2022-11-24 12:48:40 -08:00
Steve Gravrock
169a2a8ad2 Upgraded to new issue templates 2022-11-20 14:01:43 -08:00
Steve Gravrock
b267029301 Revert "Upgraded to new issue templates"
This reverts commit cf574634b8.
2022-11-20 13:58:20 -08:00
Steve Gravrock
cf574634b8 Upgraded to new issue templates 2022-11-20 13:56:47 -08:00
Steve Gravrock
f8c01574e6 Added Firefox 102 (current ESR) to browser list in README 2022-10-29 15:26:30 -07:00
Steve Gravrock
481f1e7c5c Bump version to 4.5.0 2022-10-29 14:48:32 -07:00
Steve Gravrock
5e650953cd Added Safari 16 to supported browsers 2022-10-22 13:08:10 -07:00
Steve Gravrock
ed5e902106 Parallel: Don't allow reporters to be added or removed in worker processes 2022-10-22 09:56:52 -07:00
Steve Gravrock
87f9ab29df Fixed the jsdoc types of SuiteResult and SpecResult ids 2022-10-19 17:20:24 -07:00
Steve Gravrock
47c64a86d5 Parallel: fail if randomization is disabled or a seed is specified 2022-10-12 20:08:42 -07:00
Steve Gravrock
bb497beeff Parallel: throw if Env#topSuite is called 2022-10-11 20:16:36 -07:00
Steve Gravrock
e14d9c4be3 Parallel: forbid beforeAll/afterAll at the top level
Either running these once total or running them once per process
would be the wrong choice for a significant chunk of users, so do
neither. Later we'll add a new API for exactly-once setup and teardown
in parallel mode.
2022-10-11 20:10:02 -07:00
Steve Gravrock
89e0b35c53 Parallel: throw an error if fit/fdescribe are used in parallel mode 2022-10-11 19:35:59 -07:00
Steve Gravrock
1e7b68236b Parallel: forbid beforeEach/afterEach at the top level of spec files
Each spec file is only loaded in a single worker, so top level
before/afterEach can't behave consistently.

beforeEach/afterEach are still supported in:
* Helper files
* describe() blocks
* At the top level of spec files in non-parallel mode
2022-10-11 19:25:39 -07:00
Steve Gravrock
394068f863 Depend on -npm 5.0 2022-10-08 15:39:57 -07:00
Steve Gravrock
b831e81074 Include inner exceptions in stack traces 2022-09-24 12:12:21 -07:00
Steve Gravrock
4c13c2b00b Replaced var with const in API doc examples 2022-09-24 10:12:22 -07:00
Steve Gravrock
dd98a45003 Use lcoal core when running our own tests in parallel 2022-09-18 19:59:21 -07:00
Steve Gravrock
fe6762b470 Merge branch '5.0' into parallel 2022-09-18 16:42:25 -07:00
Steve Gravrock
fa16b74500 Merge branch 'main' into 5.0 2022-09-18 13:39:05 -07:00
Steve Gravrock
4cd190b232 Merge branch 'internal-async' 2022-09-18 13:31:43 -07:00
Steve Gravrock
6ada55ff77 Parallel: Fixed reporting of exceptions thrown by a describe 2022-09-18 12:10:34 -07:00
Steve Gravrock
735ce6f758 Merge remote-tracking branch 'origin/5.0' into parallel 2022-09-18 09:43:31 -07:00
Steve Gravrock
430324885b Merge branch 'main' into 5.0 2022-09-18 09:41:45 -07:00
Steve Gravrock
7c2e8ce7ca Merge branch 'main' into parallel 2022-09-17 13:26:37 -07:00
Steve Gravrock
d4025999b7 Report exceptions thrown by a describe before any it calls
Previously, these were masked by the "describe with no children" error.
Now they're reported as suite level errors on an empty suite.
2022-09-17 13:24:45 -07:00
Steve Gravrock
871111424d Use one worker per CPU when running own specs in parallel 2022-09-17 12:20:05 -07:00
Steve Gravrock
44f331f43d Updated the style of the examples
* const/let instead of var
* classes
* pass our own eslint checks
2022-09-17 12:00:20 -07:00
Steve Gravrock
213144413f Test parallel operation in CI 2022-09-17 11:44:24 -07:00
Steve Gravrock
2272f9aead Parallel: run our own specs in parallel 2022-09-17 11:35:03 -07:00
Steve Gravrock
59848ca151 Coerce the random string to a seed before sending it to reporters
This fixes an error in HTMLReporter when the configured seed is a
number rather than a string, which has been allowed since 3.8.0
2022-09-03 12:36:35 -07:00
Steve Gravrock
c14bfe3e5f Updated release process doc
* Fixed description of patch releases
* Moved -npm release docmentation to that repo
* Refer to -npm specifically rather than "binding libraries" generally,
  now that we only have one of those that versions in lockstep with core.
2022-09-03 11:02:13 -07:00
Steve Gravrock
26c48ab324 Bump version to 4.4.0 2022-09-03 09:42:39 -07:00
Steve Gravrock
4c8d57e14c Dropped support for Node 14 2022-08-27 10:47:40 -07:00
Steve Gravrock
543689e206 Depend on -npm from github 2022-08-27 10:46:25 -07:00
Steve Gravrock
ee524831f4 Merge branch 'main' into parallel 2022-08-27 10:30:21 -07:00
Steve Gravrock
cfecab9f79 Updated contributing guide 2022-08-22 18:10:33 -07:00
Steve Gravrock
b3d9435dbb Convreted TreeProcessor to async/await 2022-08-22 17:04:44 -07:00
Steve Gravrock
fec8dd37b0 Merge branch 'main' into internal-async 2022-08-22 10:46:03 -07:00
Steve Gravrock
0690500a0d Breaking change: Made Env#execute async
Errors related to invalid spec order are now reported via promise
rejection rather than synchronous throw.
2022-08-21 16:40:03 -07:00
Steve Gravrock
0bfbda720d Breaking change: Env#execute no longer takes a callback
Use the returned promise instead.
2022-08-21 16:35:12 -07:00
Steve Gravrock
4fcdbd39fb Breaking change: use addEventListener rather than setting window.onerror
* Generally simplifies error handling in browsers
* Makes Jasmine's own integration tests easier to debug
* Stack traces will be provided for more global errors
* ... but less error information will be provided in some browsers if the
  error comes from a file:// URL (use `npx serve` or similar instead)
* Jasmine will no longer override existing onerror handlers in browsers
* Setting window.onerror will no longer override Jasmine's global error
  handling (use jasmine.spyOnGlobalErrors instead)
2022-08-21 16:17:18 -07:00
Steve Gravrock
f934e6d816 Assume that addEventListener/removeEventListener are present in browsers
Jasmine 3.0 dropped support for the last browser that didn't support
the standard event handler methods (IE 9).
2022-08-20 10:27:44 -07:00
Steve Gravrock
79c6bbc189 clearStack optimizations
* Avoid setTimeout in Node, because we don't need the overhead there.
* Still call setTimeout in browsers to prevent the tab from being killed.
* Use queueMicrotask in Safari, because it's dramatically faster than
  MessageChannel there.
* Continue to use MessageChannel in other supported browsers becuase it's
  somewhat faster than queueMicrotask there.
* Don't use setImmediate any more because there's a faster alternative in
  all supported envs.

In jasmine-core's own test suite, this yields a roughly 50-70% speedup
in Node, ~20% in Edge, and 75-90%(!) in Safari.
2022-08-15 17:50:49 -07:00
Steve Gravrock
2e80ec0c22 Rm dead code for QueueRunner deprecations 2022-08-11 19:51:08 -07:00
Steve Gravrock
588283cfe5 Breaking change: support for -npm reporter handling in parallel mode
* The `boot` function exported by the core module returns the same object
  every time it's called.
* Removed node_boot.js. Use the exported `boot` function instead
* JasmineStartedInfo does not have totalSpecsDefined or order in parallel mode
* JasmineDoneInfo does not have order in parallel mode
* Added incompleteCode and numWorkers to JasmineDoneInfo
2022-08-10 18:23:38 -07:00
Steve Gravrock
3a43871901 Reset the env state between parallel batches 2022-08-06 10:55:02 -07:00
Steve Gravrock
fcbab02b2d Droped support for Node 12 2022-08-06 10:55:02 -07:00
Steve Gravrock
5f3475342e Re-added missing JasmineStartedInfo jsdoc 2022-08-06 10:53:28 -07:00
Steve Gravrock
e022e6199c Bump version to 4.3.0 2022-07-23 10:27:19 -07:00
Steve Gravrock
140c12e8fc Added Firefox 102 (current ESR) to CI 2022-07-23 10:17:21 -07:00
Steve Gravrock
21f25972bb Converted ReportDispatcher to promises 2022-07-01 17:25:22 -07:00
Steve Gravrock
d0e1bd96fb README updates
* Removed redundancy
* Added a link to the FAQ
* Removed obsolete support channels
2022-07-01 16:58:38 -07:00
Steve Gravrock
6c56ebc984 Added jasmine.spyOnGlobalErrorsAsync
* Allows testing code that's expected to prodeuce global errors or
  unhandled promise rejections
* Fixes #1843
* Fixes #1453
2022-06-30 18:09:56 -07:00
Steve Gravrock
d0a9931ae6 Separated reporter- and runable-specific queue runner configuration 2022-06-12 15:52:14 -07:00
Steve Gravrock
93c5f654d9 Extracted most suite-running code out of Env 2022-06-12 15:46:03 -07:00
Steve Gravrock
d8b65028a1 Pass queue runner factory to Spec#execute, not ctor 2022-06-12 12:34:46 -07:00
Steve Gravrock
d6cdc1841c Extracted suite building out of Env 2022-06-12 09:49:01 -07:00
Steve Gravrock
72b39220e5 Runable, not runnable 2022-06-11 15:41:29 -07:00
Steve Gravrock
55dce7d119 Extracted runnable resource management out of Env 2022-06-11 15:28:37 -07:00
Steve Gravrock
789736dd02 Additional test coverage for default spy strategies 2022-06-11 15:08:02 -07:00
Steve Gravrock
c7ca3b0101 Converted integration specs to async/await 2022-06-11 13:43:44 -07:00
Steve Gravrock
96000220b1 Use arrow fns rather than self = this 2022-06-11 12:12:11 -07:00
Steve Gravrock
e2e2275d41 Removed obsolete and unused utility fns 2022-06-11 11:17:16 -07:00
Steve Gravrock
135ff20123 Replaced uses of var with const/let 2022-06-09 20:00:23 -07:00
Steve Gravrock
4af86f5398 Added supported envs to releasen notes 2022-06-09 18:25:04 -07:00
Steve Gravrock
e5e0e6481d Bump version to 4.2.0 2022-06-09 18:18:45 -07:00
Steve Gravrock
bcf69b86b4 Removed duplicate Suite and Spec jsdocs 2022-06-03 12:22:58 -07:00
Steve Gravrock
a5f79fac81 Removed remaining jshint config comments 2022-06-02 18:22:23 -07:00
Steve Gravrock
18a00822c5 Built distribution 2022-06-02 11:37:10 -07:00
Steve Gravrock
4cc8437f79 Call buildExpectationResult directly from Suite and Spec
This removes quite a bit of indirection from result processing, at the
cost of making a few of the tests more awkward.
2022-06-01 10:18:23 -07:00
Steve Gravrock
8e58305b0a ExpectationResult.js -> buildExpectationResult.js 2022-06-01 09:26:21 -07:00
Steve Gravrock
bd368aceee Replaced var with const and let in expectation related code 2022-06-01 09:22:03 -07:00
Steve Gravrock
8f16021887 Replaced var with const and let in ExpectationResult 2022-06-01 09:02:43 -07:00
Steve Gravrock
bbb1b69b2e More reliably report errors that occur late in the suite/spec lifecycle
Previously, an error that occurred after Jasmine started to report the
suiteDone or specDone event for the current runable would not be reliably
reported. Now such an error is reported on the nearest ancestor suite whose
suiteDone event has not yet been reported.
2022-05-28 18:10:55 -07:00
Steve Gravrock
9ea8a2096f Additional integration tests for existing async error handling 2022-05-28 18:01:19 -07:00
Steve Gravrock
66340e2b19 Updated browserslist to match 4.0 envs 2022-05-28 18:00:45 -07:00
Steve Gravrock
fe29dfa89c Update release process instructions
* Need to tag the release manually since the Ruby tooling for that was
  removed
* Windows CI works again, so no need to manually test on Windows
2022-05-21 09:43:43 -07:00
Steve Gravrock
41f7fabe2f Renamed jasmine.exactly to jasmine.is, for similarity with toBe 2022-05-21 08:30:53 -07:00
Steve Gravrock
856a040a2d Fixed flaky spec 2022-05-19 16:39:48 -07:00
Steve Gravrock
f7eaa5ec29 Fixed failing CI builds for Node 12 and 14
See https://github.com/npm/cli/issues/4896
2022-05-16 19:53:20 -07:00
Steve Gravrock
0c87d47318 Added a jasmine.exactly asymmetric equality tester 2022-05-14 17:01:38 -07:00
Steve Gravrock
c24b2f5a73 Converted some integration specs to async/await 2022-05-14 12:05:53 -07:00
Steve Gravrock
774c83a36e Don't report a deprecation when a runnable uses two forms of async
This was made into an error in 4.0, so the deprecation is redundant
(and broken).
2022-05-14 11:21:40 -07:00
Steve Gravrock
751cf6ab5b Converted DiffBuilder, ObjectPath, MismatchTree, and SinglePrettyPrintRun to ES6 classes 2022-05-14 11:15:08 -07:00
Steve Gravrock
2fd76c954c Replaced var with let and const in PrettyPrinter, DiffBuilder, and friends 2022-05-14 09:42:07 -07:00
Steve Gravrock
bb4d18f959 Include property getter values in pretty-printed objects
We already call getters when comparing objects for equality and generating
diffs, so it should be safe to do it here too.

See #1966.
2022-05-12 17:14:13 -07:00
Steve Gravrock
68eaa64c31 Bump version to 4.1.1 2022-05-09 17:49:42 -07:00
Steve Gravrock
81f6eb45ea Cleaned up specs for symbol property filtering
* Removed redundant spec
* Test the behavior of jasmineUnderTest, not the host jasmine
2022-05-09 17:11:36 -07:00
Steve Gravrock
841b212c66 Merge branch 'patch-1' of https://github.com/suke/jasmine
* Merges #1963 from @suke
* Excludes non-enumerable symbol properties from equality comparison
2022-05-09 16:51:47 -07:00
Steve Gravrock
9a27407d35 Folded util.objectDifference into MatchersUtil
This was always an implementation detail of objectKeysAreDifferentFormatter,
and didn't really do what its name suggested.

* #1966
2022-05-07 14:03:26 -07:00
Steve Gravrock
468e9577cd Include symbol properties in matcher diffs
* #1966
2022-05-07 13:26:15 -07:00
Steve Gravrock
9d80377fe3 Fixed exception when comparing arrays with Symbol keys
* Fixes #1966
2022-05-07 10:42:29 -07:00
Steve Gravrock
270344bd38 Include symbol keys when pretty-printing objects
* Fixes #1966
2022-05-07 10:05:18 -07:00
suke
dfa94c70c1 toEqual does not compare symbols that cannot be enumerated 2022-04-27 10:51:03 +09:00
Steve Gravrock
694375e4ea Added Node 18 to CI matrix 2022-04-23 12:39:44 -07:00
Steve Gravrock
1166d10e43 Use const/let in specs, not var 2022-04-16 13:41:44 -07:00
Steve Gravrock
482dc883eb Check for unused vars and params in specs 2022-04-16 10:58:25 -07:00
Steve Gravrock
364cf35474 Fixed shared example for describe-like fns 2022-04-16 10:26:07 -07:00
Steve Gravrock
2e8732f30f Added supported envs to 4.1.0 release notes 2022-04-11 21:08:07 -07:00
Steve Gravrock
04133264e0 Bump version to 4.1.0 2022-04-11 20:24:42 -07:00
Steve Gravrock
d2bf6062cb README updates
* Replaced redundant installation instructions with link to docs
* Added links to usage instructions
* Fixes #1941
2022-04-09 11:20:54 -07:00
Steve Gravrock
fb639d0f55 toBeCloseTo treats Infinity and -Infinity as close to themselves
* Fixes #1957
2022-04-09 11:14:24 -07:00
Steve Gravrock
52b1a3a7f8 Merge branch 'refactor/rm-deprecated-substr' of https://github.com/CommanderRoot/jasmine
* Merges #1962 from @CommanderRoot
2022-04-02 10:32:59 -07:00
Steve Gravrock
1f7880ee8c Updated Sauce Connect 2022-03-29 20:57:49 -07:00
Steve Gravrock
a6e1aef8d7 Added debug logging to flaky spec 2022-03-29 20:57:49 -07:00
Steve Gravrock
d2815982ce Removed obsolete vendor-specific background-size rules
* Fixes #1961
2022-03-29 07:20:02 -07:00
Tobias Speicher
aa979277fb refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-25 16:03:46 +01:00
Steve Gravrock
1e0c312f9f Merge branch 'main' of https://github.com/nitobuendia/jasmine
* Adds toHaveSpyInteractions matcher
* Merges #1959 from @nitobuenida
* Fixes #1568
2022-03-18 11:10:39 -07:00
Nito Buendia
c5db939886 Run cleanup 2022-03-17 21:09:14 +08:00
Nito Buendia
e470fb56d7 Refactor error message to account for negate comparisons
The message return on negate clause was not expected. This makes it negative to match expectation. This also add tests for the change, and renames some tests to make it more clear.
2022-03-17 21:06:51 +08:00
Nito Buendia
a8a6577cd7 Replace parameterized test with different expectations
This approach makes it hard to scale and goes against DRY and debuggability vs the previous approach which followed Python parameterized testing, but this was the recommendation of the Jasmine team to keep it consistent with other tests.

Further tests here could be adding other types like Array, Map, WeakMap, Set, WeakSet...
2022-03-17 20:16:22 +08:00
Nito Buendia
1660015c12 Run formatter 2022-03-16 23:01:20 +08:00
Nito Buendia
faf210ab4c Remove dependency on matchersUtil for test 2022-03-16 23:00:27 +08:00
Nito Buendia
00fd4a819f Refactor tests to depend on jasmineUnderTest 2022-03-16 21:48:03 +08:00
Nito Buendia
091cd8c3b6 Remove spyObj setup from test that does not require it 2022-03-16 21:34:28 +08:00
Nito Buendia
aba0c98eb9 Fix unit test to include testValue instead of a constant value 2022-03-16 21:31:40 +08:00
Nito Buendia
a7eff79db0 Simplify test for arguments passed 2022-03-16 21:26:59 +08:00
Nito Buendia
2a5673e6ab Change jasmine to jasmineUnderTest 2022-03-16 21:20:21 +08:00
Nito Buendia
c13dd26c4b Change set up to each of the formats
This goes against DRY principle, but it was recommended by Jasmine team to reduce coupling between tests.
2022-03-16 21:18:25 +08:00
Nito Buendia
2e8b477489 Change arrow functions with anonymous functions 2022-03-16 21:14:43 +08:00
Nito Buendia
b2c2e08641 Remove @since tag from JSDoc 2022-03-16 20:15:09 +08:00
Nito Buendia
d7d75abc42 Rename spec to include Spec to allow running 2022-03-16 20:14:06 +08:00
Nito Buendia
0b71d0a2a0 Merge branch 'jasmine:main' into main 2022-03-16 20:09:19 +08:00
Steve Gravrock
dfa5b6a53d Pretty-print [new String("")] as "[ '' ]" not "[]" 2022-03-14 18:47:23 -07:00
Steve Gravrock
7f75f23e5b Use new Circle CI images
The old images are deprecated:
<https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034>
2022-03-09 13:05:34 -08:00
Steve Gravrock
502cb24bb8 Merge branch '4.0.1' 2022-02-21 17:08:11 -08:00
Steve Gravrock
0ae234dc6e Bump version to 4.0.1 2022-02-21 16:58:32 -08:00
Steve Gravrock
38d102f1d1 Merge branch '3.99.1' into 4.0.1 2022-02-21 16:45:34 -08:00
Steve Gravrock
906f37fe52 Bump version to 3.99.1 2022-02-21 16:30:15 -08:00
Steve Gravrock
4a2b10998a Remove Safari 8 and 9 from CI matrix
These browsers are still nominally supported by Jasmine 3.x, but they no
longer work on Saucelabs.
2022-02-19 14:23:02 -08:00
Steve Gravrock
d8b2efe4d6 Downgrade jasmine-browser-runner for compatibility with IE 2022-02-19 14:21:35 -08:00
Steve Gravrock
9d9e8f0c17 Lint fixes 2022-02-19 12:33:19 -08:00
Steve Gravrock
4059ab7ba6 Don't report a deprecation when a promise is resolved to something
beforeEach(() => somePromiseReturningFn()) is likely a common idiom
and we don't want to treat it as an error.

* Fixes #1958
2022-02-19 12:28:47 -08:00
Nito Buendia
7b01003d0b Add specs for the new toHaveSpyInteractions matcher 2022-02-16 21:11:42 +08:00
Nito Buendia
8e85f3df74 Create toHaveSpyInteractions matcher
This matcher checks all the properties of a given spy object and checks whether at least one of the spies has been called. It returns true if one or more of the spies of the spy object has been called and false otherwise.
2022-02-16 21:10:31 +08:00
Steve Gravrock
b0034797fe Merge branch 'fix-save-args-by-value' of https://github.com/coyoteecd/jasmine
* Fixes cloning of Date objects in saveArgumentsByValue()
* Merges #1955 from @coyoteecd
* Fixes #1885
2022-02-02 21:18:38 -08:00
Dan Cortel
83e9f88952 Make saveArgumentsByValue clone Date objects correctly
* Fixes #1885
2022-01-26 18:32:05 +02:00
Gwendolyn Van Hove
de13b47809 Update maintainers list 2022-01-20 15:57:48 -08:00
Steve Gravrock
9e10743a1c Include the name of the suite in the empty suite error message 2022-01-17 15:08:56 -08:00
Steve Gravrock
5327157832 Always run formerly flaky specs 2022-01-17 14:54:21 -08:00
Steve Gravrock
6e3128c792 Merge branch 'SymboltoEqual' of https://github.com/laeleoni/jasmine
* Merges #1879 from @laeleoni
* Fixes #1879
2022-01-15 11:44:53 -08:00
Steve Gravrock
bd2e877f4e Removed scheduled workflows from Circle CI config
Scheduled pipelines (configured via the Circle web UI) will be used instead.
2022-01-15 10:50:03 -08:00
Steve Gravrock
5b23ffe174 Merge pull request #1951 from ath0mas/patch-1
Update html example in README
2022-01-04 20:37:03 -08:00
Alexis THOMAS
384e0859c7 Update html example in README
Follow SpecRunner.html: Simplifies types (197cb13817) and Split boot.js in two (286524959b)
2022-01-04 23:51:30 +01:00
Steve Gravrock
616682e487 Stop cron builds on 3.99 and 4.0 2022-01-01 13:29:39 -08:00
Steve Gravrock
98c2f019c6 Bump version to 4.0.0 2022-01-01 12:43:29 -08:00
Steve Gravrock
507dad6d87 Set -npm and -browser-runner dev dependencies back to main 2022-01-01 12:10:24 -08:00
Steve Gravrock
6da7a32442 Merge branch '4.0' 2022-01-01 12:00:46 -08:00
Steve Gravrock
58d13570ac Bump version to 3.99.0 2022-01-01 10:47:59 -08:00
Steve Gravrock
005648acd8 Built distribution 2022-01-01 10:46:15 -08:00
Steve Gravrock
ff14c03a40 Test against the latest Node 12 2022-01-01 08:44:28 -08:00
Steve Gravrock
ff848c812a Merge branch 'main' into 4.0 2021-12-31 15:07:03 -08:00
Steve Gravrock
d963be5eec Log a deprecation warning on reentrant calls to Clock#tick
See #1929
2021-12-31 11:38:01 -08:00
Steve Gravrock
8444faab72 Use the clock from jasmineUnderTest in specs 2021-12-31 10:00:14 -08:00
Steve Gravrock
883f400074 Merge branch '4.0' of https://github.com/thw0rted/jasmine into 4.0
* Fixes handling of reentrant calls to `jasmine.clock().tick()`
* Merges #1948 from @thw0rted
* Fixes #1929
2021-12-31 09:50:09 -08:00
Steve Gravrock
3c16caa413 Link to the CONTRIBUTING guide from the PR template 2021-12-31 09:47:46 -08:00
Steve Gravrock
5d0be2e6cf Updated the contributing guide for 4.0
* Moved "Before Submitting a Pull Request" to the top
* Removed discussion of the standard Github PR workflow
  (Contributors who don't know how to create PRs on Github at all can find
  that information elsewhere. For the rest, it's just noise.)
* Misc copy edits
2021-12-31 09:43:46 -08:00
James Bromwell
c56631175f Fix time-travel in delayed function scheduler 2021-12-29 17:50:48 +01:00
Steve Gravrock
cef738966c Updated dev dependencies 2021-12-21 17:51:28 -08:00
Steve Gravrock
5fd0e49ccf Removed unused ejs dev dependency 2021-12-21 17:00:10 -08:00
Steve Gravrock
c431590d65 Fixed reporting of suites that are skipped due to a beforeAll failure 2021-12-20 13:39:24 -08:00
Steve Gravrock
656e6614da Built distribution 2021-12-15 20:36:44 -08:00
Steve Gravrock
24408a16ed Removed initialization of unused Promise config property 2021-12-15 20:34:00 -08:00
Steve Gravrock
ca90c76d12 Merge branch '3.99' into 4.0 2021-12-14 08:27:05 -08:00
Steve Gravrock
57c294b307 Added a migration guide link to multiple done call deprecations 2021-12-14 08:16:06 -08:00
Steve Gravrock
e73eb18753 Test against jasmine-browser-runner 1.0.0-dev 2021-12-13 21:41:09 -08:00
Steve Gravrock
0411b0567d Added a mention of 4.0 migration to the README 2021-12-11 16:13:51 -08:00
Steve Gravrock
30b93ccdbb Updated jsdocs for Env#execute 2021-12-11 15:53:25 -08:00
Steve Gravrock
067b91b3ef Removed IE/PhantomJS support code 2021-12-11 14:57:41 -08:00
Steve Gravrock
0b1385c3d3 Report start and end events for specs/suites that are skipped due to a beforeAll error
This is noisier, but it maintains compatibility with reporters that assume
(quite reasonably) that all specs and suites are either filtered out or
reported.
2021-12-11 12:34:23 -08:00
Steve Gravrock
f1cf6ee419 Resolve the execute() promise to the entire JasmineDoneInfo
This matches jasmine-npm.
2021-12-09 18:18:36 -08:00
Steve Gravrock
b37d989f13 Removed past-EOL Firefox versions 2021-12-07 18:16:00 -08:00
Steve Gravrock
89151d6e64 Dropped Safari 13 from build matrix 2021-12-07 17:04:19 -08:00
Steve Gravrock
75e3e14861 Merge remote-tracking branch 'upstream/safari-15' into 4.0 2021-12-07 17:03:40 -08:00
Steve Gravrock
ce7460d8d4 Fixed stack trace filtering on Safari 15 2021-12-07 16:50:07 -08:00
Steve Gravrock
b8dabf96ff HTML: Include top suite failures in the reported failure count 2021-12-03 08:18:18 -08:00
Steve Gravrock
40fac8b6a2 Renamed the trace feature to debugLog[s]
"trace" was ambiguous and could easily be understood to have something
to do with stack traces.
2021-12-02 14:46:56 -08:00
Steve Gravrock
5eb42d67a7 Added a note about async testing style to contributing guide 2021-12-02 12:40:14 -08:00
Steve Gravrock
d739c23401 Resolve the promise returned by Env#execute to the overall status 2021-12-02 12:40:14 -08:00
Steve Gravrock
42e6c45efa Allow use without creating globals
* Fixes #1235
2021-11-29 20:37:07 -08:00
Steve Gravrock
5942654856 Merge branch '3.99' into 4.0 2021-11-26 13:27:57 -08:00
Steve Gravrock
f3b26a0688 Merge branch 'main' into 3.99 2021-11-26 13:25:14 -08:00
Steve Gravrock
8804ddb8cf Updated boot file lists for the Ruby gem and Python egg
This prevents consumers that rely on those lists (especially the Jasmine
gem and egg) from getting a deprecation warning about boot.js.
2021-11-24 15:38:40 -08:00
Steve Gravrock
439be97c34 Rephrased note about verboseDeprecations 2021-11-24 11:45:32 -08:00
Steve Gravrock
871ba99a30 Allow custom spy strategies to be inherited like other runnable resources 2021-11-17 12:50:16 -08:00
Steve Gravrock
7a685b16f6 Removed duplicate message from errors (incl. matcher failures) on V8 2021-11-16 12:52:07 -08:00
Steve Gravrock
2a049015b0 Use custom equality testers in Spy#withArgs
Fixes #1836.
2021-11-15 18:55:09 -08:00
Steve Gravrock
c48fb0b0e7 Added Firefox 91 (current ESR) to CI matrix 2021-11-14 14:18:06 -08:00
Steve Gravrock
4c47bf6c0b Merge branch '3.10.1' into main 2021-10-22 16:34:57 -07:00
Steve Gravrock
e86a7f00a6 Bump version to 3.10.1 2021-10-22 16:15:54 -07:00
Jan Molak
504ef27899 Fixed result.pendingReason for specs marked with xit. Closes #1939 2021-10-22 14:12:28 -07:00
Steve Gravrock
2a39339755 Merge branch 'fix/pending-reason' of https://github.com/jan-molak/jasmine into main
* Fixes missing pendingReason in pending spec results
	* Fixes #1939
	* Merges #1940 from @jan-molak
2021-10-22 14:09:48 -07:00
Jan Molak
2c440b8e44 Fixed result.pendingReason for specs marked with xit. Closes #1939 2021-10-22 17:58:31 +01:00
Steve Gravrock
8e74529631 Merge branch '3.99' into 4.0 2021-10-15 10:37:51 -07:00
Steve Gravrock
b13329114c Set version to 3.99.0-dev 2021-10-15 10:33:21 -07:00
Steve Gravrock
ab34f272da Merge branch 'main' into 3.99 2021-10-15 10:29:50 -07:00
Steve Gravrock
1af0e62ef7 Revert "Revert "Dogfood the new jasmine-npm completion interface""
This reverts commit 4c043717a9.
2021-10-14 07:07:10 -07:00
Steve Gravrock
572452a15a Added supported environments to 3.10.0 release notes 2021-10-13 16:47:48 -07:00
Steve Gravrock
896412367a Bump version to 3.10.0 2021-10-13 15:46:21 -07:00
Steve Gravrock
503a7409f0 Merge branch 'issue-1854-asyncerror' of https://github.com/AndreWillomitzer/jasmine into main
* Improves error message when an async expectation occurs after the spec
  finishes
* Merges #1937 from @AndreWillomitzer
* Fixes #1854
2021-10-12 17:15:53 -07:00
Steve Gravrock
c1db8f2f82 Clarified deprecation message for this in describes 2021-10-12 15:40:13 -07:00
Andre Willomitzer
bb9175cb66 added additional error msg for delayedExpectation
added matching error msgs in jasmine objects

Ran prettier.

removed indenting, formatted column length < 80
2021-10-12 13:17:24 -04:00
Steve Gravrock
41f5c53959 Consistently identify clenaup fns by a type tag, not position
This was already done for everything except spec cleanup fns, since the
various skip policies need to know the difference between afterEach and
afterAll.
2021-10-11 18:05:57 -07:00
Steve Gravrock
25c3f06839 Run afterAll fns after failure even if stopOnSpecFailure is true
[#160905297]
2021-10-08 14:19:56 -07:00
Steve Gravrock
976928c7ae Set version to 4.0.0-pre.0 2021-10-08 08:48:22 -07:00
Steve Gravrock
36a4ddf433 Revert "Removed jsdoc entry for SpecResult#trace"
This reverts commit 4482355885.
2021-10-07 10:56:52 -07:00
Steve Gravrock
53b1cd37b6 Merge branch '3.99' into 4.0 2021-10-07 10:56:41 -07:00
Steve Gravrock
8cadfbd829 Fixed deprecation warning in spec 2021-10-07 10:51:06 -07:00
Steve Gravrock
86aeb5c88a Merge branch 'main' into 3.99 2021-10-07 10:38:35 -07:00
Steve Gravrock
469b557828 Merge branch 'fix/ie' of https://github.com/nicojs/jasmine into main
* Merges #1936 from @nicojs
2021-10-07 10:17:16 -07:00
Nico Jansen
503715c275 test(ie): refactor promises to callbacks 2021-10-07 10:23:52 +02:00
Steve Gravrock
d4c15b8df4 No longer test Node <12.17 2021-10-06 17:58:28 -07:00
Steve Gravrock
6f0c51260f Depend on the 4.0 branch of -npm 2021-10-06 17:54:54 -07:00
Steve Gravrock
4482355885 Removed jsdoc entry for SpecResult#trace
Deferred to 4.0.
2021-10-06 11:31:29 -07:00
Steve Gravrock
6542364381 Merge branch 'feat/support-multiple-runs' of https://github.com/nicojs/jasmine into main
* Merges #1934 from @nicojs
* Fixes #1925
2021-10-06 11:20:34 -07:00
Nico Jansen
1fc911e0fa Support running jasmine multiple times
Add support for running jasmine multiple times.

```js
const Jasmine = require('jasmine');

async function main() {
  const jasmine = new Jasmine({ projectBaseDir: process.cwd() });
  let specId = 'spec0';
  jasmine.loadConfigFile('./spec/support/jasmine.json');
  jasmine.env.configure({
    specFilter(sp) {
      return sp.id === specId;
    },
    autoCleanClosures: false
  });
  jasmine.exit = () => {};
  await jasmine.execute();
  specId = 'spec2';
  await jasmine.execute();
}

main().catch((err) => {
  console.error(err);
  process.exitCode = 1;
});
```

With `jasmine.env.configure({ autoCleanClosures: false })` you disable Jasmine's feature to automatically clean closures (functions) during the test run. This is a requirement to be able to rerun.

When `execute` is called more than once, the `topSuite.reset` is called, which will reset the state for the next run as well as reset any child suites.

Add a function `exclude` to the `Suite` and `Spec` clases. This functions similar to `pend`, but will allow the "pending" state to persist over multiple runs. This is useful when `xit` is used.

Revert changes to jasmine.js

fix: make sure to call hooks during second run

Remove jsdoc from private apis

Fix elint issue

Add new line
2021-10-06 20:12:45 +02:00
Steve Gravrock
15710937b8 Added a test that verifies skip to cleanup fns after pending()
Because pending() is implemented via the standard exception handling
path, we effectively got this feature for free as a result of the changes
for #1533, particularly 457a2727.

* [#178598493]
* Fixes #1579
2021-10-06 11:07:53 -07:00
Steve Gravrock
1a9d16715d Clarify which behaviors are specific to different stopSpecOnExpectationFailure values
* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
b67a3043c7 Skip afterEach fns in nested suites when a beforeEach fn errors
This matches the behavior of beforeAll errors.

* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
5f1ef5ac2b Skip everything except afterAll fns when a beforeAll fn errors
* Fixes #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
5eaeeb0b6c Moved fn skipping policy out of QueueRunner
This should allow us to more easily support complex skipping strategies
like skipping nested cleanup fns when the corresponding befores were
skipped, or skipping specs and suites when a beforeAll fails.

* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
457a2727ba Skip to afterEach fns when a beforeEach fn errors
* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
a1f14efac6 Improved specs for stopSpecOnExpectationFailure
* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
b2067d9ce0 Fixed references to Env#trace in jsdocs 2021-10-02 09:58:47 -07:00
Steve Gravrock
47081258cd Revert "Revert "Added the ability to associate trace information with failing specs""
This reverts commit fdad8849df.
2021-10-02 09:56:25 -07:00
Steve Gravrock
9c03d4d3e9 Merge branch '3.99' into 4.0 2021-10-02 09:52:43 -07:00
Steve Gravrock
7f0087b805 Merge branch 'main' into 3.99 2021-10-02 09:47:30 -07:00
Steve Gravrock
fdad8849df Revert "Added the ability to associate trace information with failing specs"
Pushing this back to 4.0 in hopes of increasing the chance that third
party reporters will notice it and add support.

This reverts commit 7a289f1de7.
2021-10-02 09:45:15 -07:00
Steve Gravrock
7a289f1de7 Added the ability to associate trace information with failing specs
This is meant to aid in debugging failures, particularly intermittent
failures, in cases where interactive debugging or console.log aren't
suitable.
2021-09-25 16:19:28 -07:00
Steve Gravrock
ef981bb794 Run the browser-flakes build on the debugging branch 2021-09-25 15:50:34 -07:00
Steve Gravrock
c3fb3e985a Reject timeout values that are too large for setTimeout
See #1930
2021-09-25 15:43:31 -07:00
Steve Gravrock
7fc3408051 Expanded jsdocs for jasmine.DEFAULT_TIMEOUT_INTERVAL 2021-09-25 13:29:44 -07:00
Steve Gravrock
af1b43eeff Merge branch 'patch-1' of https://github.com/trusktr/jasmine into main
* Merges #1931 from @trusktr
* Adds discussion of max timeout value to jsdocs
2021-09-25 13:28:34 -07:00
Steve Gravrock
4c043717a9 Revert "Dogfood the new jasmine-npm completion interface"
This works, but until the -npm 3.10.0 is out, it creates a chicken and egg
problem where each of core 3.10.0 and -npm 3.10.0 needs to be released
after the other.

This reverts commit 1c9382c990.
2021-09-25 12:11:20 -07:00
Steve Gravrock
35064cf60e Merge branch '3.99' into 4.0 2021-09-24 14:31:02 -07:00
Steve Gravrock
fb4c16b23e Merge branch 'main' into 3.99 2021-09-24 14:27:15 -07:00
Steve Gravrock
3b28ee7c29 Fixed extra deprecation when passing custom equality testers to MatchersUtil#contains 2021-09-24 14:25:54 -07:00
Steve Gravrock
40be00310d Don't immediately move to the next queueable fn on async error
This allows assertion failures and other errors that occcur after the async
error to be routed to the correct spec/suite.

Previously, Jasmine treated global errors and unhandled promise rejections
just like exceptions thrown from a synchronous spec: it recorded the error
as a spec failure and moved on. Now, global errors and uhandled rejections
are recorded as failures but the current queueable fn will continue until
it either signals completion or times out. Global errors and unhandled
rejections are different from synchronous exceptions: it's common for the
queueable fn that caused them to continue executing. Immediately moving on
often meant that the queueable fn would produce expectation failures or
other errors when a different spec or suite was running, thus causing
those failures to be routed to the wrong place.
2021-09-24 11:22:04 -07:00
Steve Gravrock
3a77ae3dfe Throw if the argument to jasmine.clock().mockDate() is not a Date 2021-09-23 16:10:59 -07:00
Steve Gravrock
1332f01ca4 Merge branch '3.99' into 4.0 2021-09-23 16:08:44 -07:00
Steve Gravrock
64d58ed1f0 Deprecate non-Date arguments to jasmine.clock().mockDate() 2021-09-23 16:04:39 -07:00
Steve Gravrock
497a7fc3e5 Merge branch 'main' into 3.99 2021-09-23 15:49:47 -07:00
Steve Gravrock
1f318c3c93 Added missing @since annotations 2021-09-23 13:38:52 -07:00
Steve Gravrock
be29aa95eb Improved jsdocs for asymmetric equality testers 2021-09-23 11:59:20 -07:00
Steve Gravrock
e3c9a59c6c Added a stringContaining asymmetric equality tester
* Fixes #1923.
2021-09-22 11:28:24 -07:00
Joe Pea
b312ed4940 update base.js docs, mention setting DEFAULT_TIMEOUT_INTERVAL to a high number while debugging
This info is useful because if someone does not set the number to a high enough value while stepping through test code, before or after hooks may be triggered mid-test while the user is debugging which will be confusing.
2021-09-21 21:39:21 -07:00
Steve Gravrock
8d302d8dca Merge branch '3.99' into 4.0 2021-09-20 15:57:37 -07:00
Steve Gravrock
00f6708e1f Removed unused submodule 2021-09-18 09:43:02 -07:00
Steve Gravrock
760f2d9003 Removed additional Ruby support files 2021-09-18 09:40:30 -07:00
Steve Gravrock
6e10f22403 Don't display late errors as AfterAll errors in the HTML reporter 2021-09-11 08:57:50 -07:00
Steve Gravrock
d092a59bd1 Treat multiple calls to done callbacks as errors 2021-09-10 18:07:35 -07:00
Steve Gravrock
af5984d5d6 Fixed flake list 2021-09-10 17:53:59 -07:00
Steve Gravrock
15f7013f85 Merge branch '3.99' into 4.0 2021-09-08 21:04:10 -07:00
Steve Gravrock
be23836c9d Deprecate multiple calls to done callbacks 2021-09-08 20:58:25 -07:00
Steve Gravrock
7944250290 Merge branch 'main' into 3.99 2021-09-06 17:39:28 -07:00
Steve Gravrock
3a47a3bd04 Fixed flaky spec 2021-09-06 15:35:37 -07:00
Steve Gravrock
1c9382c990 Dogfood the new jasmine-npm completion interface 2021-09-04 13:39:17 -07:00
Steve Gravrock
394be99832 Fixed sass deprecation warnings
See <https://sass-lang.com/documentation/breaking-changes/slash-div>.
[#179260511]
2021-09-03 15:51:51 -07:00
Steve Gravrock
bbcb5ff42f Fixed linter & formatter issues in boot files 2021-09-03 15:46:23 -07:00
Steve Gravrock
6603ed7ddc Don't distribute boot src files
[#179017951]
2021-09-03 15:42:06 -07:00
Steve Gravrock
d61800c5c8 Removed support for custom promise libraries
All supported platforms now provide promises, so there's no longer a need
for Jasmine to be able to create them via a user-provided library. Jasmine
can still consume non-native promises but will always use the built-in
Promise object to create promises.

[#179078103]
2021-08-30 19:07:26 -07:00
Steve Gravrock
37b9f8e420 Removed Ruby support
[#179247162]
2021-08-30 18:53:13 -07:00
Steve Gravrock
a63b0b0368 Merge branch '3.99' into 4.0 2021-08-30 18:44:32 -07:00
Steve Gravrock
de9815f436 Merge branch 'main' into 3.99 2021-08-30 18:41:02 -07:00
Steve Gravrock
62a667a8e3 Added a deprecation notice to the gem's description
[#179330717]
2021-08-30 18:37:31 -07:00
Steve Gravrock
d277827d5e Fixed typo in 3.9.0 release notes 2021-08-21 19:09:01 -07:00
Steve Gravrock
644c175338 Print a deprecation message when the jasmine-core gem is loaded
[#179247158]
[#179247160]
2021-08-21 18:35:38 -07:00
Steve Gravrock
a6d7eb2a06 Bump version to 3.9.0 2021-08-21 12:00:23 -07:00
Steve Gravrock
2fd9d7b13f Merge branch 'main' into 3.99 2021-08-17 17:08:34 -07:00
Steve Gravrock
dd8a65cb60 Better reporting of unhandled promise rejections with truthy but non-Error reasons on Node
[#179227413]
2021-08-14 14:03:03 -07:00
Steve Gravrock
e72d161fab Return a promise from Env#execute in environments that support promises
[#178373231]
2021-08-07 13:05:55 -07:00
Steve Gravrock
4e96514634 Deprecated the Promise config setting
4.0 will only support environments that have native promises, so there will
no longer be a need for a user-supplied promise library
2021-08-07 12:04:14 -07:00
Steve Gravrock
d8862aa583 Removed the failFast and oneFailurePerSpec config properties 2021-07-31 09:28:14 -07:00
Steve Gravrock
2480a0a93a Merge branch '3.99' into 4.0 2021-07-31 09:15:12 -07:00
Steve Gravrock
9c9836c5b3 Don't use deprecated config prooperties in boot*.js 2021-07-31 09:09:46 -07:00
Steve Gravrock
20b914c554 Deprecated the failFast and oneFailurePerSpec config properties 2021-07-31 08:42:01 -07:00
Steve Gravrock
058e77b824 Merge branch 'main' into 3.99 2021-07-31 08:15:29 -07:00
Steve Gravrock
dcaac62a6c Updated deprecaton messages for Env#throwOnExpectationFailure() and Env#stopOnSpecFailure() 2021-07-31 08:02:39 -07:00
Steve Gravrock
b696bec9e3 Renamed failFast and oneFailurePerSpec config props to stopOnSpecFailure and stopSpecOnExpectationFailure
The new names are more self-explanatory and consistent with jasmine-npm. The
old names are deprecated but still work.

[#178682783]
2021-07-31 07:51:50 -07:00
Steve Gravrock
13dfcacbb0 Remove access to non-public properties of suites and specs returned by describe, it, etc.
[#179064612]
2021-07-30 17:36:50 -07:00
Steve Gravrock
6d002d22af Merge branch '3.99' into 4.0 2021-07-29 21:46:48 -07:00
Steve Gravrock
799d9897fd Deprecated access to non-public members in specs and suites returned from it(), describe(), etc. 2021-07-29 21:28:47 -07:00
Steve Gravrock
2a2a671b65 Don't deprecate access to Suite#id and Spec#id 2021-07-29 20:15:04 -07:00
Steve Gravrock
a0b4f3748d Merge branch 'main' into 3.99 2021-07-29 20:09:25 -07:00
Steve Gravrock
43073b3bc5 Added API docs for Suite#id and Spec#id
These properties are the only way to obtain runnable IDs, without which
you can't call the form of Env#execute that takes an array of IDs.
2021-07-29 19:32:15 -07:00
Steve Gravrock
09d2ce9bc9 Removed more code that supported browsers we no longer run on 2021-07-27 17:53:09 -07:00
Steve Gravrock
e9bddc7a06 Removed obsolete timing function hacks from boot1.js 2021-07-26 19:04:43 -07:00
Steve Gravrock
310e4d5e6c Removed legacy boot.js file 2021-07-26 18:29:54 -07:00
Steve Gravrock
0424d4ae99 Removed Python support 2021-07-26 18:28:38 -07:00
Steve Gravrock
0720c88252 Merge branch '3.99' into 4.0 2021-07-26 18:20:24 -07:00
Steve Gravrock
f26b005807 Deprecated the legacy boot.js file 2021-07-26 18:20:07 -07:00
Steve Gravrock
1206952ca6 Merge branch 'main' into 3.99 2021-07-26 18:19:11 -07:00
Steve Gravrock
286524959b Split boot.js in two to allow the env to be configured in between
This is mainly intended to support jasmine-browser-runner, which will load
a script that configures the env in between the two boot files (boot0.js and
boot1.js). The single-file boot.js is retained for now but will be removed
in a future release.
2021-07-26 18:05:36 -07:00
Steve Gravrock
c73df57720 MatchersUtil#contains uses deep equality rather than === for set members
[#169001712]
2021-07-24 14:23:05 -07:00
Steve Gravrock
0170005015 Treat any argument to the done callback as an error
This reduces the risk of incorrectly passing a spec due to not correctly
detecting that an argument is an `Error` instance. Detecting Error instances
in a way that's reliable and portable across different browsers, TrustedTypes,
and frames is difficult.

[Finishes #178267587]
2021-07-24 09:30:39 -07:00
Steve Gravrock
6f04044417 Merge branch '3.99' into 4.0 2021-07-24 09:25:19 -07:00
Steve Gravrock
70d49e5b57 Deprecate non-Error arguments passed to done()
[Finishes #178267600]
2021-07-24 09:18:24 -07:00
Steve Gravrock
ed9363f477 Removed bower.json
Bower itself has been deprecated for four years, so we should drop support
for it in 4.0.

[Finishes #178512921]
2021-07-24 08:23:09 -07:00
Steve Gravrock
fe0a83ba87 Removed support for Internet Explorer 2021-07-23 21:46:15 -07:00
Steve Gravrock
623eecdcec Removed json2.js
Environments that don't provide a JSON parser are ancient history.
2021-07-22 21:37:57 -07:00
Steve Gravrock
2c32dd5703 Run browser-flakes build before regular cron build 2021-07-20 17:57:54 -07:00
Steve Gravrock
a27280e9e7 Merge branch '3.99' into 4.0 2021-07-20 17:55:18 -07:00
Steve Gravrock
10601f5af6 Merge branch 'main' into 3.99 2021-07-20 17:47:17 -07:00
Steve Gravrock
c10ab4e704 Updated deprecation links 2021-07-20 16:50:31 -07:00
Steve Gravrock
c1d1d69be2 Fixed test failures in Chrome and Edge 2021-07-19 12:08:40 -07:00
Steve Gravrock
3513249d73 Built distribution 2021-07-19 12:08:18 -07:00
Steve Gravrock
21bfbbb721 Merge branch 'iserror-tt' of https://github.com/bjarkler/jasmine into main
* Fixes Trusted Types error in Chromium-based browsers
* Merges #1921 from @bjarkler
* Fixes #1910
2021-07-19 12:06:12 -07:00
Steve Gravrock
88b90ec258 Backfilled unit tests for j$.isError_ 2021-07-19 10:31:53 -07:00
Steve Gravrock
e399953174 Removed obsolete timing function hacks from boot.js 2021-07-17 17:49:53 -07:00
Steve Gravrock
4edac7d3d1 Dropped Safari <13 from test matrix 2021-07-10 09:21:41 -07:00
Steve Gravrock
9b3d4a2bf2 Merge branch '3.99' into 4.0 2021-07-10 09:13:28 -07:00
Steve Gravrock
17826cd044 Fixed deprecations in matchersUtilSpec 2021-07-10 09:11:10 -07:00
Steve Gravrock
6cb9507f62 Merge branch 'main' into 3.99 2021-07-10 08:58:14 -07:00
Steve Gravrock
50c88e7774 Mark Env#hideDisabled deprecated in jsdocs 2021-07-08 18:53:21 -07:00
Steve Gravrock
3e64ce3310 Removed property tests for MatchersUtil#equals
These might be useful for a function with a more restricted domain. But for
equals, which accepts two of literally anything, the short run was too short
to catch any problems and the long run tended to exceed the CircleCi timeout.
2021-07-03 08:37:15 -07:00
Steve Gravrock
00586e50e0 Bump version to 3.8.0 2021-07-01 17:06:14 -07:00
Bjarki
dc80a282ba Make j$.isError_ compatible with Trusted Types
The isError_ check uses a heuristic that calls the Function constructor
to determine if the given value is an Error object. This results in a
runtime violation in test suites that enforce Trusted Types.

Since Trusted Types are only supported in modern browsers (currently,
Chromium-based browsers), we can use a more straightforward heuristic in
environments where Trusted Types are supported.

Fixes #1910. See that thread for more details.
2021-07-01 20:21:44 +00:00
Steve Gravrock
27c650ec08 Updated package description 2021-06-30 17:10:51 -07:00
Steve Gravrock
56daa6f461 Merge branch 'select-spec' of https://github.com/jlpstolwijk/jasmine into main
* Merges #1920 from @jlpstolwijk
* Fixes spec filtering in Karma
* Fixes #1906
2021-06-29 17:10:06 -07:00
Joris Stolwijk
e4c7d8af45 new attempt for fixing #1906: add window.location.pathname to hrefs + comments + fixed tests 2021-06-29 14:03:25 +02:00
Steve Gravrock
ee88ecc614 Revert "add url pathName in toQueryString function - fixes (https://github.com/jasmine/jasmine/issues/1906 ) + comment + test"
Reverted because it breaks the option checkboxes in the HTML reporter, both
in the standalone distribution and in jasmine-browser-runner.

Reopens #1906.

This reverts commit 1e4f0d1545.
2021-06-28 12:42:05 -07:00
Steve Gravrock
ec038273f1 Updated contributing guide
* Removed outdated steps
* Replaced list of environments with a pointer to the README
* Misc copy edits
2021-06-26 11:33:03 -07:00
Steve Gravrock
c5bdd79a1e Added TS typings and jasmine-browser-runner to issue template 2021-06-26 11:21:19 -07:00
Steve Gravrock
dbc1a0aa56 Added expectAsync(...).already
* Causes async matchers to immediately fail if the promise is pending
* Fixes #1845
2021-06-23 20:13:01 -07:00
Steve Gravrock
5862b22aef Include rejection details in failure messages for toBeResolved and toBeResolvedWith
[#178559119]
2021-06-21 16:43:51 -07:00
Steve Gravrock
163f93d6ff Removed constructors from jsdocs of classes that aren't user-constructable 2021-06-21 14:19:31 -07:00
Steve Gravrock
1893bf6c16 Added jsdocs for asymmetric equality testers 2021-06-21 14:09:14 -07:00
Steve Gravrock
095745ab12 Removed gulp-jasmine-browser mention from README 2021-06-21 13:31:28 -07:00
Steve Gravrock
68db3f6fcf Merge branch 'select-spec' of https://github.com/jlpstolwijk/jasmine into main
* Merges #1907 from @jlpstolwijk
* Fixes #1906
* Fixes spec filtering in karma-jasmine-html-reporter
2021-06-14 17:59:29 -07:00
Joris Stolwijk
1e4f0d1545 add url pathName in toQueryString function - fixes (https://github.com/jasmine/jasmine/issues/1906 ) + comment + test 2021-06-14 15:05:12 +02:00
Steve Gravrock
c546d2cb6d Merge branch 'patch-1' of https://github.com/eltociear/jasmine into main
* Fixes typo in spec name
* Merges #1918 from @eltociear
2021-06-13 09:57:23 -07:00
Steve Gravrock
6e097528f5 Include only specified files in the NPM package 2021-06-13 09:52:01 -07:00
Ikko Ashimine
4e1f36cbb0 Fix typo in SpySpec.js
ommitted -> omitted
2021-06-12 10:00:36 +09:00
Steve Gravrock
0aee81cfb9 Remvoed checks for typed array support in the test suite
All supported browsers have all typed arrays except for Uint8ClampedArray,
BigInt64Array, and BigUint64Array.
2021-06-05 13:31:26 -07:00
Steve Gravrock
1e50b49092 Fixed test failures on IE 10 2021-06-05 13:13:46 -07:00
Steve Gravrock
6aecf16cde Test coverage for MatchersUtil#equals with typed arrays 2021-06-05 12:03:11 -07:00
Steve Gravrock
f2de1be96a Fixed "stop spec on expectation failure" checkbox in standalone
Fixes [#178248968].
2021-06-01 08:49:34 -07:00
Steve Gravrock
a0f6b77c3e Remove access to non-public Suite and Spec members via Env#topSuite 2021-05-29 18:57:56 -07:00
Steve Gravrock
3f3fb38cf1 Merge branch '3.99' into 4.0 2021-05-29 18:42:31 -07:00
Steve Gravrock
00c1e3d608 Deprecate access to non-public Suite and Spec members via Env#topSuite
The deprecation warning relies on Proxy, and won't work in environments
that don't have it. Among Jasmine's supported environments, that's Safari 9,
Safari 8, and all versions of IE.
2021-05-29 15:45:10 -07:00
Steve Gravrock
6a2a30d540 Improved & unified deprecation handling
* De-duplication now happens in core, not in reporters. This ensures that
  the console doesn't get flooded.
* Stack traces are opt-out, not opt-in.
* The current runnable is not reported or logged for certain deprecations
  where it's irrelevant.
* HtmlReporter shows stack traces in expandable widgets.
* Env#deprecated and Env#deprecatedOnceWithStack are merged.
2021-05-29 15:39:28 -07:00
Steve Gravrock
5f4a1c4276 Merge branch 'issue/1897' of https://github.com/Dari-K/jasmine into main
* Adds option for spyOnAllFunctions to include non-enumerable props
* Merges #1909 from @Dari-k
* Fixes #1897
2021-05-26 17:44:54 -07:00
Darius Keeley
a4ef3687ee Add optional param to spyOnAllFunctions to include non-enumerable properties 2021-05-25 11:37:24 +01:00
Steve Gravrock
e4e232864d Don't expose Suite objects as this of describe functions
This was a holdover from 1.x that should have been removed in 2.0,
but was missed. Suite is meant to be private, and almost none of
its methods can be safely called by user code.
2021-05-22 09:15:22 -07:00
Steve Gravrock
5acddcda4a Merge branch '3.99' into 4.0 2021-05-22 09:09:03 -07:00
Steve Gravrock
61fb353197 Deprecate access to Suite objects via this in describes
Jasmine 1.x exposed Suite objects to user code as the `this` in describe
functions. That should have been removed in 2.0 but it was missed. It
will be removed in 4.0. This change adds a deprecation warning if anything
on a describe's `this` is accessed.

The deprecation warning relies on Proxy, and won't work in environments
that don't have it. Among Jasmine's supported environments, that's Safari 9,
Safari 8, and all versions of IE. In those browsers, a describe's `this`
will still be a Suite for now, but there will be no deprecation warnings.
2021-05-22 09:07:31 -07:00
Steve Gravrock
9065b4c3b7 Added a jsdoc cross-reference from Configuration to its usage 2021-05-21 17:13:07 -07:00
Steve Gravrock
752441a66f Merge branch '3.99' into 4.0 2021-05-18 17:12:29 -07:00
Steve Gravrock
3e2872a1df Merge branch 'main' into 3.99 2021-05-18 17:07:34 -07:00
Steve Gravrock
140225e7c3 Isolate specs that are flaky in browsers
* Don't run them in browsers in the regular CI build
* Run them in browsers in a special nightly build
* Run them in Node in the regular CI build
* Run them when developers manually run the suite

This should allow the regular CI build to give us a more useful signal,
while keeping us from losing sight of the flaky specs.
2021-05-15 07:44:25 -07:00
Steve Gravrock
8b38389d56 Test against Node 16
* Replaced node-sass dependency that isn't compatible with Node 16
* Added Node 16 to CI matrix
* Fixes #1894
2021-05-13 17:18:57 -07:00
Steve Gravrock
b7c2a2f6fb Removed unused dev dependencies 2021-05-13 12:52:44 -07:00
Steve Gravrock
c5d4a40219 Deprecated Python 2021-05-08 12:06:49 -07:00
Steve Gravrock
c7c8b6b93e Added Chrome back to CI browser list 2021-05-04 17:24:06 -07:00
Steve Gravrock
8a42437059 Added a note about testing on Windows to the releasing instructions 2021-05-04 09:28:35 -07:00
Steve Gravrock
cacc6f4278 Skip the middle Safari versions to speed up CI 2021-04-24 15:07:23 -07:00
Steve Gravrock
d815e99456 Added jsdocs for Spy.callData.returnValue 2021-04-24 14:57:33 -07:00
Steve Gravrock
5e3f937221 Added a note about correct usage of async matchers 2021-04-24 12:43:25 -07:00
Steve Gravrock
1b97795684 Merge branch '3.99' into 4.0 2021-04-23 08:41:12 -07:00
Steve Gravrock
5504965bea Merge branch 'main' into 3.99 2021-04-23 08:40:25 -07:00
Steve Gravrock
d666f1efbb Run browser tests on push, except for PRs 2021-04-23 08:39:02 -07:00
Steve Gravrock
4515b76f07 Run browser tests on all non-PR branches 2021-04-23 08:37:29 -07:00
Steve Gravrock
0897e31a2d Run cron builds on 3.99 and 4.0 branches 2021-04-23 08:37:18 -07:00
Steve Gravrock
c2a714f168 Removed support for IE 10 and Safari 8 2021-04-23 08:14:19 -07:00
Steve Gravrock
c2b558a2da Fail specs that try to combine two forms of async 2021-04-22 22:44:37 -07:00
Steve Gravrock
235efe52f1 Fixed test failure in IE 2021-04-22 22:43:48 -07:00
Steve Gravrock
1e8619df88 Removed deprecated env methods 2021-04-22 22:38:08 -07:00
Steve Gravrock
4b2a14f1f3 Removed deprecated custom matcher, matchersUtil, pp, etc interfaces 2021-04-22 22:29:20 -07:00
Steve Gravrock
66189d742b Merge branch 'no-children' of https://github.com/johnjbarton/jasmine into 4.0
* Merges #1742 from @johnjbarton
2021-04-22 21:35:58 -07:00
Steve Gravrock
fb05da1fc3 Merge branch 'main' into 3.99 2021-04-22 17:23:08 -07:00
Steve Gravrock
9555cb9842 Pass Sauce tunnel identifier correctly 2021-04-17 16:14:45 -07:00
Steve Gravrock
d6fa9dd1a0 Fixed jsdocs for Spy#calls#thisFor 2021-04-17 12:32:59 -07:00
Steve Gravrock
25fbe0646a Merge branch 'spy-calls-thisFor' of https://github.com/ajvincent/jasmine into main
* Merges #1903 from @ajvincent
* Adds Spy#calls#thisFor
2021-04-17 12:14:41 -07:00
Steve Gravrock
316ce1e2d3 Updated contributing guide etc. 2021-04-17 11:54:11 -07:00
Steve Gravrock
82cc1083b6 Migrated from Travis to Circle CI 2021-04-17 11:34:56 -07:00
Steve Gravrock
c2f04ba627 Further compensate for clock jitter 2021-04-17 11:34:56 -07:00
Steve Gravrock
97a46f4560 Fixed test failures on Safari 8 and 9 2021-04-17 11:34:56 -07:00
Steve Gravrock
113134cdbd Fixed test failure in Firefox 68 ESR 2021-04-17 11:34:56 -07:00
Steve Gravrock
dad5f5fd6b Fixed test failure in Safari 8 2021-04-17 11:34:53 -07:00
Alexander J. Vincent
fa72544974 CallTracker.thisFor(): add test for undefined context object. 2021-04-13 18:35:04 -07:00
Alexander J. Vincent
e303de52ed Implement CallTracker.thisFor(). 2021-04-11 22:59:43 -07:00
Steve Gravrock
5f9315731e Improved handling of unhandled promise rejections with no error in Node
* Fixes #1759
2021-04-06 18:48:56 -07:00
Steve Gravrock
ce850c472a API docs for Env#topSuite and Suite 2021-04-03 11:09:30 -07:00
Steve Gravrock
8b3a6561b1 Merge branch 'main' into 3.99 2021-04-02 11:35:30 -07:00
Steve Gravrock
2fc5182ddc Added missing jsdocs
* Env#execute
* Env#allowRespy
* Enough of Spec to support spec filters
2021-03-31 18:16:58 -07:00
Steve Gravrock
6be2102b64 Built distribution 2021-03-26 17:27:14 -07:00
Steve Gravrock
c6a79d3ab7 Merge branch 'patch-2' of https://github.com/UziTech/jasmine into main
* Merges #1892 from @UziTech
* Fixes config.seed type in jsdocs
2021-03-26 17:25:30 -07:00
Tony Brix
3f232fba80 docs: seed can be number or string 2021-03-26 00:10:15 -05:00
Tony Brix
cde6ea79a3 docs: fix jsdoc seed type 2021-03-25 22:05:02 -05:00
Steve Gravrock
0782a73a98 Merge branch 'array_buffer' of https://github.com/Finesse/jasmine into main
* Adds support for ArrayBuffers to matchersUtil.equals
* Merges #1891 from @Finesse
* Merges #1689 from @dankurka
* Fixes #1687
2021-03-22 13:06:40 -07:00
Surgie Finesse
37073e2768 Fix the review notices 2021-03-22 19:26:33 +10:00
Surgie Finesse
f7f928fdd3 Merge remote-tracking branch 'upstream/main' into array_buffer
# Conflicts:
#	spec/core/matchers/matchersUtilSpec.js
2021-03-22 18:33:50 +10:00
Steve Gravrock
503b653a10 Travis browser matrix updates
* Added latest Safari
* Added the Firefox version that's closest to current ESR
2021-03-21 11:30:21 -07:00
Steve Gravrock
cb044aa273 Bump version to 3.7.1 2021-03-18 17:28:04 -07:00
Steve Gravrock
5c17456925 Updated release instructions 2021-03-17 19:44:16 -07:00
Steve Gravrock
592fba22b8 Bump version to 3.7.0 2021-03-17 18:38:34 -07:00
Steve Gravrock
58ef707bc6 Added jasmine.isSpy to the public interface
* Fixes #1880
2021-03-17 17:58:51 -07:00
Steve Gravrock
050c1f051c Fixed intermittent test failures 2021-03-14 12:23:17 -07:00
Steve Gravrock
8d0c52e2ec Temporarily removed global error handler stack validation
This fails somewhat frequently (every 2-4 runs of Jasmine's own test
suite) on Safari. Until we get to the bottom of that, it's removed.
2021-03-14 11:46:23 -07:00
Steve Gravrock
de91427356 Fixed instructions for running Jasmine's ci script 2021-03-14 11:43:38 -07:00
Steve Gravrock
324bc201c2 Built distribution 2021-03-13 13:52:10 -08:00
Steve Gravrock
76f34e90dc Allow custom object formatters to be added in beforeAll
Fixes #1876.
2021-03-13 13:49:30 -08:00
Steve Gravrock
46e7158c77 Removed unused util.htmlEscape 2021-03-04 12:46:23 -08:00
Steve Gravrock
9ab039e330 Merge branch 'expectAllTruthyAndFalsy' of https://github.com/yasinkocak/jasmine into main
* Merges #1875 from @yasinkocak
* Adds additional assertions to tests for toBeTruthy and toBeFalsy
2021-02-27 10:31:31 -08:00
leoni laetitia
3234d475cd expect...toEqual check for Symbols 2021-01-31 22:32:58 +01:00
Yasin Kocak
3f5c47dff3 expect all truthy and falsy 2021-01-02 10:55:14 +01:00
Steve Gravrock
1320b0614f Merge branch 'use-global-onerror' into main
* Merges #1860 from @greghuc
* Allows specs to disable Jasmine's global error handling by overwriting
  `onerror`.
2020-11-24 11:13:24 -08:00
Gregory Huczynski
905e3fc3f9 Enable custom promise error handling through overriding of global.onerror 2020-11-24 11:04:04 -08:00
Steve Gravrock
89331bb1bb Fixed comparison between URL objects
* Fixes #1866
2020-11-21 13:47:44 -08:00
Steve Gravrock
88de272c89 Merge branch 'main' of https://github.com/JannesMeyer/jasmine into main
* Merges #1862 from @JannesMeyer
* Adds support for stack traces created by `node --enable-source-maps`
  with tools like the Typescript compiler.
2020-11-09 12:15:37 -08:00
Jannes Meyer
60bbe68148 Support source maps 2020-11-05 11:40:04 +01:00
Steve Gravrock
623e638cd4 Updated supported Node versions in README 2020-11-02 16:26:55 -08:00
Steve Gravrock
b1bcd6e825 Pointed Travis badge at travis-ci.com, not .org 2020-10-29 15:10:54 -07:00
Steve Gravrock
204acf7297 Updated Node versions in .travis.yml 2020-10-20 14:14:24 -07:00
Steve Gravrock
cd1131354b Merge branch 'enumerable' of https://github.com/DCtheTall/jasmine into main
* Merges #1859 from DCtheTall
* Fixes #1837
2020-10-10 18:01:48 -07:00
Steve Gravrock
c24aef15b1 Built distribution 2020-10-10 18:00:09 -07:00
DCtheTall
d5d5d1965f Have properties added by createSpyObj() be enumerable. 2020-10-02 13:49:34 -04:00
Steve Gravrock
d27bb8fa96 Run Prettier on all files 2020-09-29 18:05:38 -07:00
Steve Gravrock
7d5ca27b9d Check for forgotten console and debugger statements 2020-09-17 13:33:25 -07:00
Steve Gravrock
7a38db2e32 Fixed deprecations triggered from within asymmetricEqualityTesterArgCompatShim 2020-09-17 13:26:35 -07:00
Steve Gravrock
a1f1b4ae0f Merge branch 'main' into 3.99 2020-09-14 18:39:32 -07:00
Steve Gravrock
795651d3b6 Removed debugger statements 2020-09-13 13:40:15 -07:00
Steve Gravrock
e7daa429a1 Show the name of the spec/suite that caused a deprecation 2020-09-13 12:59:25 -07:00
Steve Gravrock
51ad18cb28 Warn if a runable both takes a callback and returns a promise 2020-09-13 12:47:24 -07:00
Steve Gravrock
0b81705c11 Detect global error handler stack corruption 2020-09-02 14:43:17 -07:00
Steve Gravrock
00feef8632 Fixed global error handler stack corruption in Jasmine's own tests 2020-09-02 14:01:57 -07:00
Steve Gravrock
5a715aecee Removed unnecessary console.log 2020-09-01 15:25:44 -07:00
Steve Gravrock
8cb44582bc Don't overwrite MatchersUtil methods with ones that were added to Array.prototype, esp. contains
Fixes #1849.
2020-09-01 15:18:53 -07:00
Steve Gravrock
53d8073707 Allow generator functions to be passed to .and.callFake
Fixes #1848.
2020-08-29 13:15:14 -07:00
Steve Gravrock
e0eb4755cb Merge branch 'fix-to-be-pending-typo' of https://github.com/SnailCoil/jasmine into main
* Merges #1847 from @SnailCoil
2020-08-20 17:51:02 -07:00
Aaron Snailwood
6277046213 fix typo in asyncMatcher toBePending comment 2020-08-20 10:07:35 -07:00
Steve Gravrock
6b9739030d Fixed future deprecations 2020-08-02 12:57:28 -07:00
Steve Gravrock
b0d949e0d5 Merge branch 'patch-1' of https://github.com/snowman/jasmine into main
* Merges #1839 from @snowman
    * Fixes script and CSS URLs in standalone example
2020-07-25 09:21:08 -07:00
snowman
dfdcfc5be5 Update README.md
Remove extra "jasmine/" directory in code example
2020-07-25 13:27:00 +08:00
Steve Gravrock
e5bb89847f Use jasmine-browser from npm
The current released version now works with IE, so we no longer need to
depend on main.
2020-07-23 17:29:14 -07:00
Steve Gravrock
1f68ed836e Updated the release docs 2020-07-23 17:26:43 -07:00
Steve Gravrock
c4e65e4a9a wip 2020-07-23 16:50:54 -07:00
Steve Gravrock
0cfeb0b9c3 Fixed link to custom object formatter tutorial 2020-07-23 16:36:56 -07:00
Steve Gravrock
d51da18808 Bump version to 3.6.0 2020-07-23 16:02:30 -07:00
Steve Gravrock
6f3e85f755 Only run long property tests once on CI 2020-07-16 13:03:04 -07:00
Steve Gravrock
d04b813cab Merge https://github.com/buildgroundwork/jasmine
* Merges #1766 from @amilligan
2020-07-16 10:18:08 -07:00
Steve Gravrock
70c416d5c9 Fixed jsdocs for recent additions 2020-07-10 15:41:02 -07:00
Steve Gravrock
226d3ba939 Added IE back to the Travis matrix
Now that jasmine-browser works correctly with IE, we can resume testing
against it.
2020-07-09 11:42:29 -07:00
Steve Gravrock
aa6cc31057 Show diffs involving root-level asymmetric equality testers
* Fixes #1831
2020-07-08 17:02:11 -07:00
Steve Gravrock
f8ae3eaeaa Built distribution 2020-07-08 16:53:53 -07:00
Steve Gravrock
db6aa8f3f8 Use a version of eslint that works on Node 8 2020-07-02 08:49:23 -07:00
Steve Gravrock
4e2f703615 Check for syntax and standard library objects that don't work in IE 2020-07-01 17:34:59 -07:00
Steve Gravrock
ba2aae63be Run eslint against all files 2020-07-01 16:09:14 -07:00
Steve Gravrock
fb23277367 Removed IE from Travis build matrix
We still support IE 10 and 11, but the Node selenium-webdriver has
serious problems with it. Until that's fixed or worked around, IE builds
won't pass. This gets us otherwise green so we can easily see if
anything else is broken.
2020-07-01 12:30:24 -07:00
Steve Gravrock
8cd4873e48 Removed broken Sauce status image 2020-06-29 14:37:08 -07:00
Steve Gravrock
11b63e4e3e Fixed references to master in docs 2020-06-29 14:36:00 -07:00
Steve Gravrock
b3ab9fad9d Updated toHaveBeenCalledOnceWith for new matcher interface 2020-06-26 15:14:02 -07:00
Steve Gravrock
13b967b59c Merge branch 'feat/to-have-been-called-once-with' of https://github.com/Maximaximum/jasmine into pr-merge
* Merges #1801 from @Maximaximum
* Fixes #1717
2020-06-26 15:05:04 -07:00
Steve Gravrock
0253d4fb71 Merge branch 'update-throwError-to-throw-objects' of https://github.com/terencehonles/jasmine
* Merges #1822 from @terencehonles
2020-06-26 15:00:32 -07:00
Steve Gravrock
44875673c1 Merge branch '1821-tests' of https://github.com/dasch-swiss/jasmine
* Merges #1829 from @tobiasschweizer
* Fixes #1821
2020-06-26 14:56:08 -07:00
Terence D. Honles
3943cc2ddb allow spy throwError to throw an Object
When using the following code to simulate a node error:

  spyOn(process, 'kill').and.throwError({code: 'ESRCH'})

The object passed in will be converted to a string by the Error
constructor and result in '[object Object]' which is not very useful.
This PR changes the ``throwError`` spy strategy to only convert
strings into an Error object, but any other objects which are passed
in will be thrown as is. This means the spy strategy can never emulate
throwing a bare string ``throw 'error'``, but this would be a backward
incompatible change.
2020-06-25 18:12:00 -07:00
Steve Gravrock
f4753ac0a4 Fixed syntax errors in IE 10 2020-06-25 07:36:06 -07:00
Tobias Schweizer
ce2161ca32 Add additional test for equals matcher 2020-06-25 09:41:39 +02:00
Steve Gravrock
17eda7a2de Depend on head of jasmine-browser
This should fix CI, and can be reverted once a new version of
jasmine-browser that contains 33bd0fcb0ba990102dcd846e673d07b11041dd44
has been published.
2020-06-24 17:50:16 -07:00
Steve Gravrock
7119720fc7 Merge branch 'dp/missing-punctation' of https://github.com/dirkpuge/jasmine
* Merges #1828 from @dirkpuge
2020-06-23 17:02:47 -07:00
Steve Gravrock
f4e192a428 Merge branch 'expose-property' of https://github.com/johnjbarton/jasmine
* Merges #1820 from @johnjbarton
2020-06-23 16:58:54 -07:00
Dirk Puge
45ad7fd13c Added missing periods 2020-06-21 11:48:05 -04:00
johnjbarton
0cb304131f fix(env): expose setSpec/SuiteProperty on interface 2020-05-26 14:50:01 -07:00
Steve Gravrock
8a731e17a7 Improved jsdocs for user-specified spec/suite properties 2020-05-05 17:58:16 -07:00
Steve Gravrock
7416c176a7 Merge branch 'properties' of https://github.com/johnjbarton/jasmine
* Merges #1763 from @johnjbarton
2020-05-05 17:45:43 -07:00
Maksym Kobieliev
0f6ebaa784 Merge branch 'master' into feat/to-have-been-called-once-with 2020-04-14 22:08:13 +03:00
Maksym Kobieliev
f14f620e15 Merge pull request #1 from jasmine/master
Merge master
2020-04-14 22:07:34 +03:00
Maksym Kobieliev
e94e6c5b75 Fix failing unit test 2020-04-14 22:01:56 +03:00
johnjbarton
f90d9943fe feat(env): setSpecProperty/setSuiteProperty(key, value) to attach data to tests
Use setSpecProperty to attach key/value pairs to spec results that can be
picked up in specialized jasmine reporters.  Example use-cases
include:
  * Tagging specs with URLs or string-tokens referencing test-plan docs.
  * Recording performance information for blocks of JS.
Similarly setSuiteProperty attaches key/value pairs to suite results
2020-04-14 11:27:14 -07:00
Steve Gravrock
8991b1bba3 Fixed toHaveSize matcher on IE 10 & 11 2020-04-12 21:22:14 -07:00
Steve Gravrock
78c3a007ad Fixed test failure in Firefox 74 2020-04-11 12:08:49 -07:00
Steve Gravrock
30b31096b8 Merge branch 'master' of https://github.com/chivesrs/jasmine
* Merges #1802 from @chivesrs
2020-04-11 11:32:08 -07:00
Steve Gravrock
2b318a6154 Merge branch 'master' of https://github.com/parloti/jasmine
* Merges #1807 from @parloti
* Fixes #1775
* Prevents undesired reloads when karma-jasmine-html-reporter is used
2020-04-11 11:30:25 -07:00
Steve Gravrock
41293714fd Merge branch 'tobepending' of https://github.com/DCtheTall/jasmine
* Merges #1808 from @DCtheTall
* Fixes #1803
2020-04-11 11:17:49 -07:00
DCtheTall
08779f2657 add missing trailing newline 2020-04-09 15:20:23 -04:00
DCtheTall
76a99aef86 add missing trailing newline 2020-04-09 15:19:47 -04:00
DCtheTall
6b213a958d Add expectAsync().toBePending() 2020-04-09 15:13:33 -04:00
Alex Parloti
9a7dfb15d2 fix #26
fix #26
Returning false will cause 'zone.js' to invoke e.preventDefault(), preventing the page from reloading.
2020-04-02 21:01:56 +02:00
Maksym Kobieliev
ec9904bf52 Fix test 2020-04-02 21:38:54 +03:00
Maksym Kobieliev
bcc28d7063 Output a diff if there was only one call, but with wrong parameters 2020-04-02 21:31:17 +03:00
Gregg Van Hove
79d55216fc Use internal type checks instead of instanceof to support browsers that don't include the types 2020-03-18 08:57:44 -07:00
Gregg Van Hove
7e940542f8 Merge branch 'wokier-toHaveSize'
- Merges #1796 from @wokier
2020-03-18 08:13:50 -07:00
Gregg Van Hove
ec3ebcb7bb Clean up toHaveSize 2020-03-18 08:13:21 -07:00
Francois Wauquier
c521b4d47c toHaveSize 2020-03-18 08:13:10 -07:00
Chives
66fe69a149 Add test for resolveTo/rejectWith with empty parameters 2020-03-16 03:15:58 -04:00
Maksym Kobieliev
e13fd13529 Add a toHaveBeenCalledOnceWith matcher 2020-03-13 20:41:24 +02:00
Gregg Van Hove
f1eac6fb04 Merge branch 'chivesrs-master'
- Merges #1797 from @chivesrs
2020-03-12 12:28:08 -07:00
Chives
6440ca434d Add trailing newlines to example code 2020-02-29 04:30:03 -05:00
Steve Gravrock
93ad31e0af Correctly report spec and suite duration
Previously, suite duration was always reported as 0 and spec duration
was always reported as null. Suites always used a no-op timer, and
specs set their result.duration after the result had already been sent
to reporters.

Fixes #1676.
2020-02-22 16:53:36 -08:00
Steve Gravrock
a6a9550d1e Fixed 'since' versions for MatchersUtil 2020-02-13 10:52:54 -08:00
Steve Gravrock
6c68715554 Removed unnecessary uses of new 2020-02-13 09:26:33 -08:00
Steve Gravrock
c39c110eca Deprecate describes with no children 2020-02-12 16:44:44 -08:00
Steve Gravrock
18b2646d1d Allow libraries to avoid "Passing custom equality testers to MatchersUtil#contains is deprecated" while remaining compatible with older jasmine versions
Previously, a custom matcher library that wanted to remain compatible with
Jasmine <= 3.5.x could not know whether or not Jasmine expected it to pass
custom equality testers to MatchersUtil#contains. Passing them would produce
a deprecation warning in newer versions and not passing them would break
compatibility with older versions. Now we use matcher factory arity to
determine whether to pass custom equality testers to the factory, which
allows libraries to do something like this:

function matcherFactory(util) {
   const customEqualityTesters = arguments[1];
   // customEqualityTesters will be undefined in newer versions of Jasmine
   // and defined in older versions that expect it to be passed back to
   // MatchersUtil#equals.
}
2020-02-12 15:24:43 -08:00
Steve Gravrock
9aed55bb91 Improved readability of matcher-related deprecations
* Include stack traces. This makes it easier to find the matcher that
needs to be updated, particularly when it comes from a library rather
than the user's own code.

* Show each deprecation only once unless `config.verboseDeprecations`
is set. Since matchers are often added in a global `beforeEach`, logging
deprecations every time can be overwhelming.
2020-02-12 15:24:43 -08:00
Steve Gravrock
90d6f9d73c Added deprecation messages to interfaces that will be removed in 4.0
* `jasmine.pp`
* `jasmine.matchersUtil`
* Matchers that expect to receive custom equality testers
* Passing custom equality testers to `matchersUtil.contains`
* Passing custom equality testers to `matchersUtil.equals`
2020-02-12 15:24:42 -08:00
Steve Gravrock
258d55469e Merge branch 'cof-merge-candidate'
* Simplifies the matcher interface
* Adds support for custom object formatters
2020-02-12 15:16:28 -08:00
Steve Gravrock
5096d9af4e Don't construct unnecessarily asymmetricEqualityTesterArgCompatShims
This speeds up MatchersUtil#equals by about 6-7x.
2020-02-12 14:23:03 -08:00
Steve Gravrock
3be797c8d8 Fixed diffs involving jasmine.objectContaining 2020-02-12 14:22:51 -08:00
Gregg Van Hove
d10e8c2ddf Merge branch 'enelson/callThrough-constructor' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/callThrough-constructor
- Merges #1782 from @enelson
- Fixes #1760
2020-02-12 11:39:29 -08:00
Steve Gravrock
c2ada1af95 Merge branch 'custom-object-formatters' into cof-merge-candidate 2020-02-11 13:51:17 -08:00
Pivotal
ea3dd9dffc Refer to MatchersUtil instances as matchersUtil, not util 2020-02-10 17:26:05 -08:00
Steve Gravrock
d41139fea2 Added jsdocs for MatchersUtil 2020-02-10 17:26:05 -08:00
Steve Gravrock
873d1c2945 Use custom object formatters for any part of a diff, not just leaf nodes 2020-02-10 17:26:00 -08:00
Steve Gravrock
25816a6e77 Added support for custom object formatters
Custom object formatters allow users to customize how an object is
stringified in matcher failure messages. This can already be done by
adding a `jasmineToString` method to the objects in question. But
it's not always desirable or possible to do that, particularly when
objects of a given "type" do not inherit from a specific prototype.
For instance, suppose a web service returns a list of foos that are
deserialized from JSON, e.g.:

   { fooId: 42, /* more properties */ }

The only way to define `jasmineToString` on those is by writing code to
add it to each instance at runtime. But a custom object formatter can
recognize that the object it's looking at is a foo and format it
accordingly:

   jasmine.addCustomObjectFormatter(function(obj) {
      if (typeof obj.fooId !== 'number') {
            return undefined;
        }

        return '[Foo with ID ' + obj.fooId + ']';
    });

Unlike `jasmineToString`, custom object formatters are scoped to a
particular spec or suite and don't require any changes to the code
under test.
2020-02-10 17:26:00 -08:00
Steve Gravrock
1f23f1e4d2 Inject a per-runable pretty printer into MatchersUtil
This will allow us to add support for custom object formatters, which
will be a per-runable resource like custom matchers, by injecting them
into the pretty-printer.
2020-02-10 17:26:00 -08:00
Steve Gravrock
dec67bd535 Don't require matchers and asymmetric equality testers to pass custom object formatters back to Jasmine
This makes it easier to write high quality matchers and asymmetric equality
testers, and is also a step toward supporting custom object formatters.

Previously, Jasmine passed custom object formatters as the second argument
to matcher factories and as and the second argument to asymmetric equality
testers' `asymmetricMatch` method. Matchers and asymmetric equality testers
were responsible for passing the custom object formatters to methods like
`matchersUtil#equals`:

  function toEqual(util, customEqualityTesters) {
    return {
      compare: function(actual, expected) {
        // ...
        result.pass = util.equals(actual, expected, customEqualityTesters, diffBuilder);

And:

  ArrayContaining.prototype.asymmetricMatch = function(other, customTesters) {
    // ...
    for (var i = 0; i < this.sample.length; i++) {
      var item = this.sample[i];
      if (!j$.matchersUtil.contains(other, item, customTesters)) {
        return false;
      }
    }

With this change, that is no longer necessary. Matchers and asymmetric
equality testers can ignore the existence of custom equality testers and
still fully support them:

  function toEqual(util) {
    return {
      compare: function(actual, expected) {
        // ...
        result.pass = util.equals(actual, expected, diffBuilder);

And:

  ArrayContaining.prototype.asymmetricMatch = function(other, matchersUtil) {
    // ...
    for (var i = 0; i < this.sample.length; i++) {
      var item = this.sample[i];
      if (!matchersUtil.contains(other, item)) {
        return false;
      }
    }

The old interfaces are still supported, for now, but will be deprecated
in a future commit and removed in the next major release after that.

In addition to making matchers and custom equality testers simpler,
this change sets the stage for adding support for custom object
formatters. Those will be architecturally similar to custom equality
testers, and by injecting a `MatchersUtil` instance everywhere we can
add them without requiring user code to pass them around as used to be
the case with custom object formatters.
2020-02-10 17:25:50 -08:00
Steve Gravrock
83b336d9d1 Merge branch 'matcher-integration-tests' 2020-02-06 18:16:06 -08:00
Elliot Nelson
be3c8275d4 Tidy up SpyStrategy#exec 2020-02-06 10:34:55 -05:00
Elliot Nelson
bf4694333c Improve wrapper function and parameter naming 2020-02-06 10:29:02 -05:00
Elliot Nelson
9febe3159d Allow callThrough to call constructor functions without errors 2020-01-28 19:40:44 -05:00
Steve Gravrock
5e98ee951c Realign the browser testing matrix to match current reality
* Use Windows instead of Linux so we can get current browsers from Sauce.
* Test against the version of Firefox that corresponds to ESR as well as
  latest.
* Test the latest Edge rather than a specific older version.
* Test Safari 8 and 13 instead of 8, 9 and 10. What works in those versions
  is likely to work in the ones in between.
2020-01-20 12:08:01 -08:00
Steve Gravrock
fd5b9ce1ae Fixed spec failure in IE 2020-01-20 11:40:26 -08:00
Steve Gravrock
58c63e98bb Include stack traces in unhandled promise rejection messages 2020-01-20 10:50:42 -08:00
Steve Gravrock
7f392d188e Don't leak global error handlers between Jasmine's own tests 2020-01-20 10:18:29 -08:00
Steve Gravrock
6baf3a9270 Merge branch 'unhandledrejection' of https://github.com/johnjbarton/jasmine into browser-unhandled-rejections
* Merges #1778 from @johnjbarton
* Fixes #1777
2020-01-15 22:10:50 -08:00
johnjbarton
1545112744 feat(GlobalErrors): Route unhandledrejections to onerror
Fixes #1777
2020-01-14 09:38:59 -08:00
Steve Gravrock
8a5216401f Built distribution 2020-01-11 14:29:24 -08:00
Steve Gravrock
fffb8abb24 Moved property tests to the main suite
Property tests can only run in Node, so they were previously in another
directory that only gets run in Node. Now they're next to the related
non-property tests and marked pending in the browser. This makes it more
likely that a developer who normally only runs tests in the browser will
notice and run them.
2020-01-11 10:49:37 -08:00
Steve Gravrock
17e9088ac5 Merge branch 'add-it-naming' of https://github.com/johnlinp/jasmine
* Merges #1772 from @johnlinp
2020-01-11 09:17:45 -08:00
Steve Gravrock
d19ffcc231 Merge branch 'consider-all-error-messages' of https://github.com/vhermannitk/jasmine
* Merges #1776 from @vhermannitk
* Fixes #1771
2020-01-11 09:14:20 -08:00
Valentin Hermann
0b4a9edff8 Added some tests and modified the source code instead of the build product 2020-01-08 10:55:14 +01:00
Valentin Hermann
e02c24d151 Revert "Improves method messagePrefixLength. Now error messages like ReferenceError or TypeError are considered, too"
This reverts commit 913ad50a76.
2020-01-08 08:47:08 +01:00
Valentin Hermann
913ad50a76 Improves method messagePrefixLength. Now error messages like ReferenceError or TypeError are considered, too 2020-01-07 15:49:43 +01:00
Valentin Hermann
c395c525dc Revert "Improves method messagePrefixLength. Now error messages like ReferenceError or TypeError are considered as well"
This reverts commit 12fefa4b3d.
2020-01-07 15:41:02 +01:00
Valentin Hermann
12fefa4b3d Improves method messagePrefixLength. Now error messages like ReferenceError or TypeError are considered as well 2020-01-07 15:23:37 +01:00
Steve Gravrock
88b98277bc Fixed Travis build 2020-01-04 16:15:18 -08:00
Steve Gravrock
4eded6ab61 Added basic property tests for matchersUtil.equals
* See #1764 from @dubzzz
* Property tests are only run in Node, not browser.
* The Travis build sets JASMINE_LONG_PROPERTY_TESTS to enable much more
  thorough (but slow) testing.
2020-01-04 14:52:34 -08:00
John Lin
6c766b7785 Describe the naming for the function it()
When I first saw it(), I was wondering if the name "it" is
an abbreviation of anything. After some search, I finally
realized that the name is only a pronoun. Therefore, I
think it's worthwhile to include it in the documentation.
2019-12-16 12:50:18 +08:00
Adam Milligan
13ff1e037e Make changes in source files 2019-11-22 17:47:20 -05:00
Steve Gravrock
a00f995c68 Added integration tests for existing matcher interfaces 2019-11-17 15:11:58 -08:00
Steve Gravrock
795a80ec66 Added integration tests for asymmetric equality testers 2019-11-17 15:11:53 -08:00
Adam Milligan
3d1a96e020 Extend Jasmine env into correct global 2019-11-05 10:54:46 -05:00
Adam Milligan
076093c16c Properly import jasmineRequire object before using 2019-11-04 11:38:53 -05:00
Steve Gravrock
8d53f4d202 Fixed objectContaining to not match when the expected is the empty object and the actual is a non-object 2019-11-02 14:38:06 -07:00
Steve Gravrock
71631a6529 Test IE before other browsers on Travis
If the tests only fail on one browser, it's usually IE. So testing
IE first gives us faster feedback in cases where we're actively
watching the Travis build.
2019-11-02 13:14:49 -07:00
Steve Gravrock
bed56a76f8 Merge branch 'fix/number-compare-failure' of https://github.com/dubzzz/jasmine
* Merges #1764 from @dubzzz
2019-11-02 11:52:01 -07:00
Nicolas DUBIEN
97fe2e7c95 Fix: Jasmine reports toEqual(0, Number.MIN_VALUE) to be true 2019-10-31 00:31:27 +01:00
Steve Gravrock
ef3f127d27 Fixed comparison between ObjectContaining and non-objects on IE 2019-09-28 18:39:43 -07:00
Steve Gravrock
472f61ab37 Provide better diffs for object graphs that include objectContaining
Turns this output:
    Expected $[0].foo = Object({ a: 4, b: 5 }) to equal <jasmine.objectContaining(Object({ a: 1, c: 3 }))>.

into this:
    Expected $[0].foo.a = 4 to equal 1.
    Expected $[0].foo.c = undefined to equal 3.

And turns this output:
    Expected spy jasmineDone to have been called with:
       [ ... snipped very long expected call ]
    but actual calls were:
       [ ... snipped very long actual call ]

    Call 0:
      Expected $[0] = Object({ overallStatus: 'failed', totalTime: 1, incompleteReason: undefined, order: Order({ random: true, seed: '88732', sort: Function }), failedExpectations: [ Object({ matcherName: 'toBeResolved', passed: false, message: 'Suite "a suite" ran a "toBeResolved" expectation after it finished.
      Did you forget to return or await the result of expectAsync?', error: undefined, errorForStack: Error, actual: [object Promise], expected: [  ], globalErrorType: 'lateExpeztation' }) ], deprecationWarnings: [  ] }) to equal <jasmine.objectContaining(Object({ failedExpectations: [ <jasmine.objectContaining(Object({ passed: false, globalErrorType: 'lateExpectation', message: 'Suite "a suite" ran a "toBeResolved" expectation after it finished.
      Did you forget to return or await the result of expectAsync?', matcherName: 'toBeResolved' }))> ] }))>.

into this:
    Expected spy jasmineDone to have been called with:
       [ ... snipped very long expected call ]
    but actual calls were:
       [ ... snipped very long actual call ]

    Call 0:
      Expected $[0].failedExpectations[0].globalErrorType = 'lateExpeztation' to equal 'lateExpectation'.
2019-09-28 18:03:12 -07:00
Steve Gravrock
10dbf8be98 Indent multiline failure messages in the output of withContext
This makes it easier to see where each failure message begins and ends.

Before:
   Some context: a
   multiline
   message

After:
   Some context:
       a
       multiline
       message
2019-09-28 12:38:28 -07:00
Steve Gravrock
a497d0942a Report async expectations that complete after the runable completes
It's very easy to forget to `await` or `return` the promise returned
from `expectAsync`. When that happens, the expectation failure will
occur after the spec or suite's result has been reported to reporters,
and the failure will typically not be shown to the user. This change
adds a top-level suite failure in that case, similar to the way we
report unhandled exceptions or promise rejections that occur after the
runable completes. Adding the error at the top level gives us the best
chance of getting in before the set of failures we add it to is sent
to reporters.

See #1752.
2019-09-27 18:31:01 -07:00
Gregg Van Hove
9a41154e3b Merge branch 'apla-master'
- Merges #1678 from @apla
2019-09-23 16:48:22 -07:00
ivan baktsheev
fc3eb0fbd8 Handle node.js assert as an error in your specs 2019-09-23 16:47:07 -07:00
Steve Gravrock
223924a7a1 Fixed matchersUtil.contains test to fail correctly 2019-09-22 08:44:15 -07:00
Gregg Van Hove
99799f72b3 Still need some ruby stuff around to release the jasmine-core gem 2019-09-20 17:15:47 -07:00
Gregg Van Hove
e8263e38aa bump version to 3.5.0 2019-09-20 16:57:20 -07:00
Steve Gravrock
53561ae71f Show details of syntax (etc) errors when loading Jasmine's own specs 2019-09-11 13:31:01 -07:00
Steve Gravrock
68f25a758d Don't create env instances in beforeEach 2019-09-11 13:31:01 -07:00
Steve Gravrock
96ba66ad60 Built distribution 2019-09-10 11:23:27 -07:00
Steve Gravrock
ba4a8d1d00 Fixed jsdocs 2019-09-10 11:23:11 -07:00
Steve Gravrock
65d9e93a88 Removed broken & long-disabled JsApiReporter integration specs 2019-09-10 09:38:38 -07:00
Steve Gravrock
2d3ac38df8 toBeRejectedWithError can expect the error to be Error, not just a subtype 2019-09-06 14:17:52 -07:00
Steve Gravrock
5a219da848 Added basic integration tests for all built-in matchers 2019-09-06 14:10:16 -07:00
Steve Gravrock
f056f3b86c Fixed indentation 2019-09-06 13:43:30 -07:00
Steve Gravrock
aeb0b73008 Merge branch 'dtychshenko-1740-fail-on-no-expectations'
* Merges #1743 from @dtychshenko
* Fixes #1740
2019-09-05 09:50:12 -07:00
Dmitriy T
7263a38c3f Adds new configuration option to failSpecWithNoExpectations that will report specs without expectations as failures if enabled 2019-09-05 09:47:38 -07:00
Gregg Van Hove
e8870db8d3 Merge branch 'fix-missing-asynchronous-stacktrace' of https://github.com/prantlf/jasmine into prantlf-fix-missing-asynchronous-stacktrace
- Merges #1738 from @prantlf
- Fixes #1728
2019-09-04 17:42:07 -07:00
Steve Gravrock
35d15085e3 Show argument diffs in toHaveBeenCalledWith failure messages
* Fixes #1641
2019-09-03 17:18:07 -07:00
Steve Gravrock
19292e4ea4 Stop testing against PhantomJS
PhantomJS is at end of life, and the last version of Selenium that supported
it was 3.6.0, released almost three years ago. We can't test Jasmine against
PhantomJS without pinning key pieces of the project to increasingly outdated
versions of key libraries.
2019-09-03 15:40:53 -07:00
Steve Gravrock
ba71989d4b Fixed code formatting 2019-09-03 15:39:00 -07:00
Steve Gravrock
f8e5ea14bc Fail the CI build if the promise returned from jasmineBrowser.runSpecs is rejected 2019-09-03 15:34:56 -07:00
Steve Gravrock
92dfbdcdc9 Depend on acorn to work around broken deduping
See <https://github.com/eslint/espree/issues/393>.
2019-09-03 15:30:42 -07:00
Steve Gravrock
8ad1dd163b Merge branch 'arrayContaining-actuals-must-be-arrays' of https://github.com/divido/jasmine
* Merges #1746 from @divido
* Fixes #1745
2019-08-30 13:12:47 -07:00
Steve Gravrock
ded8b760aa Merge branch 'UziTech-patch-1'
* Merges #1732 from @UziTech
2019-08-30 10:27:53 -07:00
Tony Brix
07318fba37 docs change 2019-08-30 12:14:19 -05:00
Steve Gravrock
c42358c686 Fixed test failure on IE 2019-08-30 09:30:23 -07:00
Tony Brix
f77ee32c56 Add custom async matchers 2019-08-30 09:30:14 -07:00
David Diederich
0bd636b5d2 Updated arrayContaining to require actual values to be arrays
If the actual value of a test was a string, this was matching against arrays
that contained the strings. This was due to the use of the contains matcher,
which against string looks for substrings, when it was intended to look for
array elements.
2019-08-30 01:09:53 -04:00
Pivotal
008b80adc5 Merge branch 'enelson/default' of https://github.com/elliot-nelson/jasmine
* Merges #1716 from @elliot-nelson
2019-08-29 13:50:27 -07:00
Steve Gravrock
1a63ab4677 Accept configurations with Promise: undefined.
Fixes Karma and anything else that uses Env#configuration
as a starting point for a Jasmine config.
2019-08-26 15:45:13 -07:00
Ferdinand Prantl
3a7fc63879 Pick the error instance to pass to error handlers in QueueRunner
The first number is the error message in HTML5 browser, which does not include
the call stack. The error instance allows logging the complete call stack in
reporters.
2019-08-11 09:32:31 +02:00
Ferdinand Prantl
527619b0aa Restore the original global error hanler to pass all parameters along 2019-08-11 09:31:43 +02:00
johnjbarton
2369c8dba7 fix(env): Throw if nested describe has no children.
Users would like an error if it() is acciddently moved within a before/afterEach/All function.
The it() function calls ensureIsNotNested to report such an error. But if the user has no
other it() functions in the Suite, it() and thus ensureIsNotNested() is never called.

Here we check nested Suites for children; if none are found we throw.
2019-08-07 18:01:34 -07:00
Gregg Van Hove
0449b35f5a Merge branch 'tobe-tostring' of https://github.com/johnjbarton/jasmine into johnjbarton-tobe-tostring
- Merges #1718 from @johnjbarton
- Fixes #1726
2019-08-07 12:03:46 -07:00
Steve Gravrock
e50a7b6985 Merge branch 'add-map-set-matchers' of https://github.com/eventlistener/jasmine
* Merges #1741 from @eventlistener
2019-08-03 12:18:35 -07:00
Steve Gravrock
b2d9aab2b8 Use the same spec file pattern for both node and browser 2019-08-03 12:17:52 -07:00
Olga Kozlova
b01d86840a mapContaining and setContaining asymmetric matchers 2019-08-03 22:14:48 +03:00
sgravrock
385ad33f60 Merge pull request #1736 from olleolleolle/patch-1
Gemspec: Drop EOL'd property rubyforge_project
2019-08-03 08:58:01 -07:00
Steve Gravrock
18195a868c Updated async timeout message
There are now multiple ways to do async functions, and callbacks
are probably the least common in new code, so the message should
be more general rather than referring to callbacks.
2019-08-03 08:25:57 -07:00
Ferdinand Prantl
7c3434723e Use the documented interface to pick the error instance from the global error handler 2019-07-21 23:46:14 +02:00
Ferdinand Prantl
4858a62fdc Add a unit test for the global error handling including stacktrace 2019-07-16 12:00:09 +02:00
Ferdinand Prantl
df4b6e58e2 Pass the error including stacktrace to error handlers and reporters
The global window error handler is used to handle errors thrown from within asynchronous functions and tests. The first parameter is the error; the fifth parameter is the full error object including the stacktrace. Searching for the first occurrence of an error instance to work with browsers, which may not comply with the HTML5 standard.
2019-07-15 14:43:22 +02:00
Olle Jonsson
d68b47b76d Gemspec: Drop EOL'd property rubyforge_project 2019-07-14 10:38:36 +02:00
Steve Gravrock
c100bb6242 Made output of toHaveBeenCalledWith more readable
This breaks each call out onto its own line, so that it's much easier to
see where each call starts and how they differ. E.g. previously the output
would be:

    Expected spy foo to have been called with [ 'bar', 'baz', 'qux' ] but actual calls were [ [ 42, 'wibble' ], [ 'bar' 'qux' ], [ 'grault '] ]

Now it's:

    Expected spy foo to have been called with:
      [ 'bar', 'baz', 'qux' ]
    but actual calls were:
      [ 42, 'wibble' ],
      [ 'bar' 'qux' ],
      [ 'grault '].
2019-07-13 10:37:05 -07:00
Gregg Van Hove
c37e9b9db0 Add saucelabs badge to readme 2019-07-07 19:37:09 -07:00
Gregg Van Hove
5e87e1410d update to newer jasmine-browser-runner 2019-07-07 19:20:45 -07:00
Gregg Van Hove
0cd5d9339b Use node 10 for browser based builds 2019-07-07 19:01:36 -07:00
johnjbarton
6324fda065 PrettyPrinter survives if objects throw in toString 2019-06-27 10:35:59 -07:00
Gregg Van Hove
066162d6bc Merge branch 'enelson/spyobjproperty' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spyobjproperty
- Merges #1722 from @elliot-nelson
- Closes #1569
- Fixes #1442
2019-06-25 16:26:43 -07:00
Gregg Van Hove
ab01fa1978 Merge pull request #1721 from elliot-nelson/enelson/gitattributes
Fix: don't attempt to normalize PNGs (gitattributes)
2019-06-24 16:16:37 -07:00
Elliot Nelson
65e6df55ee Linting fixes 2019-06-20 07:34:31 -04:00
Elliot Nelson
45475f6d1e Allow users to pass property names to createSpyObj 2019-06-20 07:33:10 -04:00
Elliot Nelson
a536ca19f2 Don't attempt to normalize PNGs 2019-06-20 06:46:51 -04:00
Gregg Van Hove
9a6262e3cd bump browser runner to new version 2019-06-14 16:42:10 -07:00
Gregg Van Hove
e7d0d742a8 only turn on sauce_connect for jobs that need it (I think) 2019-06-14 15:43:14 -07:00
Gregg Van Hove
031515db23 rejigger travis again to not run sauce jobs for PRs 2019-06-14 15:27:24 -07:00
Gregg Van Hove
49fd22ffe6 move everything we can into the env matrix for travis 2019-06-14 15:15:29 -07:00
Gregg Van Hove
5c058b5bc4 Don't include node 10 & 12 in matrix, we're explicit later 2019-06-14 15:11:41 -07:00
Gregg Van Hove
18dbbca436 Refactor travis matrix to compress a bit more 2019-06-14 15:10:16 -07:00
Gregg Van Hove
3e888105f0 Calculate total suite run time inside the env and report in jasmineDone 2019-06-14 14:59:33 -07:00
Gregg Van Hove
15f969bee7 Add @since to most JSDoc comments
- See jasmine/jasmine.github.io#117
2019-06-12 16:23:12 -07:00
Gregg Van Hove
984018bfdf Make no expectations in HTML Reporter message a warning
- Fixes #1704
2019-06-12 13:31:25 -07:00
Gregg Van Hove
0f4e53d0e6 Update ci script to pass linting 2019-06-12 12:15:34 -07:00
Gregg Van Hove
c73c5a9dbd WIP 2019-06-12 11:42:47 -07:00
Gregg Van Hove
243adfd4ce Use jasmine-browser-runner to execute browser tests 2019-06-12 11:33:14 -07:00
Elliot Nelson
e07da96354 Apply prettier 2019-06-07 23:33:06 -04:00
Elliot Nelson
96786c793f Allow users to set a default spy strategy 2019-06-07 23:32:13 -04:00
Gregg Van Hove
d610d0bdad Use browser-runner to start server in CI 2019-06-06 14:46:19 -07:00
Gregg Van Hove
0644731680 Switch to using new jasmine-browser-runner to server files for local testing 2019-06-06 14:07:30 -07:00
Gregg Van Hove
8da1fd1ed1 Merge branch 'master' of https://github.com/pixelpax/jasmine into pixelpax-master
- Merges #1713 from @pixelpax
2019-05-30 17:47:16 -07:00
Gregg Van Hove
8af669677a Cleanup spy promise strategies to be more consistent with Jasmine at large
- Rename `resolveWith` to `resolveTo` to match `toBeResolvedTo`
- No longer wrap non-Errors in `rejectWith`

- Fixes #1715
2019-05-23 17:29:12 -07:00
Gregg Van Hove
b4cbe9850f add prettier and eslint 2019-05-21 18:23:48 -07:00
Gregg Van Hove
cf2c5c9acc Merge branch 'enelson/src-cleanup-2' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/src-cleanup-2
- Merges #1708 from @elliot-nelson
2019-05-21 17:45:46 -07:00
Gabriel Elkind
4e10cf84d5 Adds in the source-- whoops! 2019-05-20 23:51:29 -05:00
Gregg Van Hove
9f875ce666 Older versions don't support const, use var 2019-05-20 17:56:27 -07:00
Gregg Van Hove
df6a71e37d Merge branch 'spy-to-string' of https://github.com/johnjbarton/jasmine into johnjbarton-spy-to-string
- Merges #1712 from @johnjbarton
2019-05-20 17:22:05 -07:00
Gregg Van Hove
32a3288c9d Merge branch 'elliot-nelson-enelson/pp' 2019-05-20 17:18:29 -07:00
Gregg Van Hove
b12981a3e7 build dist for rounding fix 2019-05-20 17:17:55 -07:00
Gregg Van Hove
cbbdd360f8 Merge branch 'enelson/pp' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/pp
- Merges #1711 from @elliot-nelson
- Closes #1700
- Closes #1575
2019-05-20 17:13:41 -07:00
Gregg Van Hove
3a89cc92fb Merge branch 'paulvanbrenk-fix-1695'
- Merges #1710 from @paulvanbrenk
- Fixes #1695
2019-05-20 17:10:39 -07:00
Gabriel Elkind
88c8c905ba Adds width to root level html-reporter class 2019-05-20 15:25:38 -05:00
johnjbarton
d1adbdc72b fix(PrettyPrint): jasmine.createSpyObj('obj', ['toString']);
The PrettyPrint handler for scalars uses toString() but if that method
has been spyed on, then the stringify fails with
TypeError: Cannot read property 'length' of undefined.

By hanlding this case earlier in format() we avoid the error.

Add unit test covering this case.
2019-05-20 09:33:47 -07:00
Elliot Nelson
8225bb935f Explicitly test pretty printing objects with nested invalid toString 2019-05-20 09:09:07 -04:00
Elliot Nelson
9f704b6f3a PrettyPrinter handles objects with invalid toString implementations 2019-05-20 09:01:10 -04:00
Paul van Brenk
69a7449e50 Fix toBeCloseTo matcher for Node.js 12 and Chrome 74 2019-05-19 12:46:32 -04:00
Elliot Nelson
b1da6e3960 Cleanup: unused vars, dangling commas, negation 2019-05-18 08:11:47 -04:00
Elliot Nelson
1e855aa9b8 Cleanup: whitespace 2019-05-18 08:10:11 -04:00
Gregg Van Hove
e04d3d8a62 Fix bad merge for spyOnProperty error message 2019-05-17 17:07:47 -07:00
Gregg Van Hove
06814769c6 Merge branch 'enelson/spyregerrors' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spyregerrors
- Merges #1706 from @elliot-nelson
2019-05-17 16:44:26 -07:00
Gregg Van Hove
309e6df8fd Use Object.create to make an object with null prototype 2019-05-17 16:31:15 -07:00
Gregg Van Hove
ea1bac5b74 Merge branch 'enelson/spyonproperty' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spyonproperty
- Merges #1705 from @elliot-nelson
2019-05-17 16:21:17 -07:00
Elliot Nelson
befb8995e6 spyOnProperty jasmine-style error messages with usage note 2019-05-17 12:02:44 -04:00
Elliot Nelson
1e13039478 spyOnProperty respects the allowRespy flag 2019-05-17 11:43:22 -04:00
Gregg Van Hove
11b0d95a7d Merge branch 'enelson/toBeInstanceOf' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/toBeInstanceOf
- Merges #1697 from @elliot-nelson
2019-05-16 17:35:09 -07:00
Gregg Van Hove
95f6ba5fa2 Merge branch 'elliot-nelson-enelson/ci-errors' 2019-05-15 17:54:50 -07:00
Gregg Van Hove
d331e9cc38 Merge branch 'enelson/ci-errors' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/ci-errors
- Merges #1701 from @elliot-nelson
2019-05-15 17:54:24 -07:00
Gregg Van Hove
0129a7d007 Update contributing doc based on some of the newer tooling
- Fixes #1702
2019-05-15 17:34:57 -07:00
Elliot Nelson
0fded24d35 Introduce matchers#toBeInstanceOf 2019-05-15 11:51:46 -04:00
Elliot Nelson
c88c772ffb Print global errors encountered during CI runs 2019-05-15 11:39:45 -04:00
Gregg Van Hove
3dde56bbd8 Merge branch 'enelson/spyonall' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spyonall
- Merges #1699 from @elliot-nelson
- Fixes #1677
2019-05-14 18:01:27 -07:00
Gregg Van Hove
e377f1caae Merge branch 'elliot-nelson-enelson/ci'
- Merges #1598 from @elliot-nelson
2019-05-14 17:21:28 -07:00
Elliot Nelson
91fe87ca56 Simplify error checks in ci.js 2019-05-14 06:57:46 -04:00
Elliot Nelson
ee15309a8f Extend spyOnAllFunctions to include prototype and parent methods 2019-05-11 18:20:13 -04:00
Elliot Nelson
49c03d4a22 Improve error handling in CI test launcher 2019-05-10 06:18:35 -04:00
Gregg Van Hove
9a18fdca27 Merge branch 'enelson/spystrategies' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/spystrategies
- Merges #1688 from @enelson
- See #1590
2019-05-09 17:30:45 -07:00
Elliot Nelson
b2fb92eedd Promise-based strategies are now named resolveWith and rejectWith 2019-05-09 06:12:06 -04:00
Elliot Nelson
df818f3fbc rejectValue wraps non-Errors like throwError does 2019-05-08 09:36:12 -04:00
Elliot Nelson
4731b4ee4d Keep all Promise implementation details internal 2019-05-08 09:13:41 -04:00
Gregg Van Hove
eb30e8179a Update deprecation messages to indicate _future_ removal
- Fixes #1628
2019-05-07 17:10:04 -07:00
Elliot Nelson
95e1890e64 Improved resolveValue/rejectValue error messages 2019-05-07 16:30:48 -04:00
Elliot Nelson
72aa0bbe4d Add resolveValue and rejectValue spy strategies 2019-05-05 08:08:34 -04:00
Steve Gravrock
17a9a6417a Fixed test failure in Firefox 66.0.2 2019-05-04 10:51:34 -07:00
Gregg Van Hove
d856b0548a Merge branch 'megahertz-feature-to-be-rejected-with-error'
- Merges #1686 from @megahertz
- Fixes #1625
2019-05-03 16:36:37 -07:00
Alexey Prokhorov
8ab46566ac Fix failure messages for toBeRejectedWithError matcher 2019-05-03 09:37:11 +04:00
Daniel Kurka
2745d7d515 Add support for ArrayBuffers to matcherUtil.equals.
Fixes #1687
2019-05-02 09:49:21 -07:00
Alexey Prokhorov
35968e4a60 Add toBeRejectedWithError matcher 2019-04-26 01:46:56 +04:00
Gregg Van Hove
afb24d1050 Ignore internal ci.js from npm package
- See #1684
2019-04-22 18:10:43 -07:00
Gregg Van Hove
c6d637dcb3 Bump some dependencies 2019-04-22 18:03:37 -07:00
Gregg Van Hove
2fbeb201bc Fix failure messages for positive/negative infinity matchers
- Fixes #1674
2019-04-16 17:40:07 -07:00
Gregg Van Hove
fd60b5737c Merge pull request #1680 from acinader/patch-1
nit: fix typo
2019-04-15 17:56:23 -07:00
Gregg Van Hove
b994a17039 Merge branch 'FelixRilling-boolean-matcher'
- Merges #1679 from @FelixRilling
2019-04-15 17:48:49 -07:00
Arthur Cinader
74fa38bdfb nit: fix typo 2019-04-14 10:33:51 -05:00
Felix Rilling
369e810791 added #toBeTrue and #toBeFalse matchers 2019-04-14 10:17:59 +02:00
Gregg Van Hove
8fca3b4c11 Fix links in 3.4 release notes 2019-04-03 17:13:18 -07:00
Gregg Van Hove
e636f5f822 Bump version to 3.4 2019-04-03 17:03:07 -07:00
Gregg Van Hove
74fd0e08e7 No fit in the suite 2019-04-01 21:01:22 -07:00
Gregg Van Hove
618e24b2f8 Handle WebSocket events in IE when detecting Errors
- Fixes #1623
2019-04-01 18:52:27 -07:00
Gregg Van Hove
5c7e25e228 Allow excluded specs in CI without breaking the output 2019-04-01 18:52:01 -07:00
Gregg Van Hove
54af109d40 Merge branch 'wood1986-fix/npm-audit-dependencies-and-fast-glob-only-failed-tests'
- Merges #1672 from @wood1986
2019-03-26 17:12:53 -07:00
wood
873a237e3d Consolidate some dev dependencies and use more maintained versions 2019-03-26 17:12:21 -07:00
Gregg Van Hove
8ca4463e01 Make node execution default and override for browsers 2019-03-25 18:37:50 -07:00
Gregg Van Hove
449eb516cc Fix sauce status codes and try travis built-in node support 2019-03-25 18:33:39 -07:00
Gregg Van Hove
a5df5a6ee9 Use the correct env var from travis for tunnels 2019-03-25 18:12:15 -07:00
Gregg Van Hove
be583232b4 bump dependencies for security fixes 2019-03-25 18:01:13 -07:00
Gregg Van Hove
d389d3c002 Merge branch 'wood1986-features/no-ruby'
- Merges #1658 from @wood1986
- Fixes #883
2019-03-25 17:56:19 -07:00
Gregg Van Hove
994d11d4f3 update node CI script to work with SauceLabs 2019-03-25 17:56:06 -07:00
wood
828d14f48e Use node.js for browser-based CI 2019-03-25 17:55:53 -07:00
Gregg Van Hove
f5663a9076 Merge branch 'johnjbarton-duration'
- Merges #1660 from @johnjbarton
- Fixes #1646
2019-03-14 19:12:39 -07:00
johnjbarton
a8c2399dd8 feat(result.duration): report test duration in ms
Wrap spec start/complete in Timer start/elapsed.
configuration.timeSpecDuration = false will disable feature.

 * Add Suite result.duration, elapsed time in ms

 * Remove timeSpecDuration option.

 * Respond to review, use noopTimer
2019-03-14 09:13:57 -07:00
Gregg Van Hove
7c0f013003 Merge branch 'johnjbarton-noop-timer'
- Merges #1669 from @johnjbarton
2019-03-13 17:34:12 -07:00
johnjbarton
ca2b62b00e refactor(Timer): share htmlReporter noopTimer via Timer.js 2019-03-12 16:26:04 -07:00
Gregg Van Hove
4108deca02 Build distribution for various typo PRs 2019-03-11 17:39:03 -07:00
Gregg Van Hove
def278f90f Merge branch 'typo-suites' of https://github.com/FelixRilling/jasmine into FelixRilling-typo-suites
- Merges #1666 from @FelixRilling
2019-03-11 17:38:29 -07:00
Gregg Van Hove
6bd4a29360 Merge branch 'jsdoc-validation' of https://github.com/FelixRilling/jasmine into FelixRilling-jsdoc-validation
- Merges #1667 from @FelixRilling
2019-03-11 17:37:43 -07:00
Gregg Van Hove
fd037f53a3 Merge branch 'typo-comments' of https://github.com/FelixRilling/jasmine into FelixRilling-typo-comments
- Merges #1665 from @FelixRilling
2019-03-11 17:34:44 -07:00
Gregg Van Hove
348242b712 Merge branch 'FelixRilling-typo-received'
- Merges #1664 from @FelixRilling
- Fixes #1663
2019-03-11 17:32:32 -07:00
Felix Rilling
b74e0abee1 Fixed flipped JSDoc. 2019-03-10 11:17:50 +01:00
Felix Rilling
e33b12b17c Fixed typos in test suite descriptions. 2019-03-10 11:07:40 +01:00
Felix Rilling
dde93ade18 Fixed typos in comments. 2019-03-10 11:04:33 +01:00
Felix Rilling
63f900287c Fixed typo "receieved" to "received", Adapted test. 2019-03-10 10:59:56 +01:00
Gregg Van Hove
239a615770 No longer run Node.js v4 on Travis
- Jasmine should still work in Node.js v4, but the jshint task isn't
  working correctly
2019-02-11 13:38:00 -08:00
Gregg Van Hove
92d5957a59 Attempt to skip jshint for node.js v4 2019-02-11 09:46:36 -08:00
Gregg Van Hove
4991f2a713 Merge branch 'print_global_error_type' of https://github.com/jbunton-atlassian/jasmine into jbunton-atlassian-print_global_error_type
- Merges #1632 from @jbunton-atlassian
2019-02-11 09:02:16 -08:00
Gregg Van Hove
0d6db64eb1 Merge branch 'onerror' of https://github.com/johnjbarton/jasmine into johnjbarton-onerror
- Merges #1644 from @jognjbarton
2019-01-30 17:38:27 -08:00
Gregg Van Hove
489fb79d6e fall back to older jshint for older node 2019-01-09 11:08:32 -08:00
Gregg Van Hove
eba8c775f3 update npm dependencies 2019-01-08 17:47:53 -08:00
johnjbarton
c36a005893 Support Error.stack in globalErrors.
See https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror
2019-01-03 16:14:23 -08:00
Gregg Van Hove
37dfe50d99 Stop treating objects with a nodeType as if they are DOM Nodes
- Fixes #1638
2018-12-17 17:10:53 -08:00
Gregg Van Hove
c67a5b830c Fix 3.0 breaking changes list to include note about Spy identity 2018-12-11 17:56:17 -08:00
James Bunton
d803bd12a6 When catching a global error in Node.js, print the type of error 2018-12-11 08:32:45 +11:00
Gregg Van Hove
a621d05fa7 Merge branch 'Havunen-fix-to-equal-ie'
- Merges #1621 from @Havunen
- Fixes #1618
2018-12-03 17:45:06 -08:00
Sampo Kivistö
473f5cd359 Re-use attr variable 2018-11-04 10:44:54 +02:00
Sampo Kivistö
a81e9626df Fixes issue where PhantomJS 2 and IE 10 - 11 crashed when reporting SVG element equality 2018-11-04 10:31:33 +02:00
Gregg Van Hove
b3ccd4312c Bump version to 3.3.0 2018-10-25 09:47:09 -07:00
Gregg Van Hove
5524207658 Add api docs for .not and .withContext 2018-10-24 16:49:31 -07:00
Gregg Van Hove
1b5e0c0c10 Merge branch 'expect-context'
- Fixes #641
2018-10-24 16:32:28 -07:00
Gregg Van Hove
2d303a6e46 Merge common async/sync expectation stuff 2018-10-24 16:17:30 -07:00
Gregg Van Hove
1e47dcf2cc Pull async matchers out to their own functions
- Makes AsyncExpectation closer to Expectation
2018-10-23 16:02:31 -07:00
Gregg Van Hove
ba1e8f8008 Implement withContext for async expectations too 2018-10-22 16:42:36 -07:00
Gregg Van Hove
a91db0dfc2 more rejected to -> rejected with 2018-10-22 16:08:57 -07:00
Gregg Van Hove
1d130036f4 Merge branch 'master' into expect-context 2018-10-22 14:55:20 -07:00
Gregg Van Hove
e6a60a7bef Merge branch 'codymikol-toBeRejectedWith'
- Merges #1615 from @codymikol
- Closes #1600
- Fixes #1595
2018-10-22 11:20:03 -07:00
Gregg Van Hove
fe042fdf82 Use toBeRejectedWith instead of toBeRejectedTo 2018-10-22 11:18:56 -07:00
Gregg Van Hove
06854fe435 Merge branch 'toBeRejectedWith' of https://github.com/codymikol/jasmine into codymikol-toBeRejectedWith 2018-10-22 11:15:05 -07:00
Gregg Van Hove
7b9fc80b8f Merge branch 'tdurtschi-master'
- Merges #1616 from @tdurtshi
- Fixes #1614
2018-10-22 10:59:03 -07:00
Gregg Van Hove
3c47e71619 Also show tip for .not cases 2018-10-22 10:57:16 -07:00
Teagan Durtschi
7cbedcdda7 Add custom message for toBe() matcher when object equality check fails 2018-10-21 12:46:49 -04:00
Cody Mikol
3aa0115ae4 feat(toBeRejectedTo): implement toBeRejectedTo functionality
add functionality to determine whether a promise has been rejected to a
specific value via expectAsync

Fixes: #1595
2018-10-19 23:23:42 -04:00
Gregg Van Hove
440b6934aa Merge branch 'codymikol-assertAsync-promiseLike-support'
- Merges #1613 from @codymikol
- Fixes #1612
2018-10-19 16:24:30 -07:00
Cody Mikol
591bf1144b bugfix(assertAsync): add promiseLike support for angularJS promises
implement a promiseLike method so libraries using non-browser promise
implementations can still utilize assertAsync functionality.

Fixes: #1612
2018-10-18 21:28:32 -04:00
Gregg Van Hove
3ae61b14ad Merge branch 'm1010j-m1010j-add-status-marks-to-standalone'
- Merges #1610 from @m1010j
- Fixes #1596
2018-10-01 12:25:23 -07:00
Matthias Jenny
705a6508d4 Add status marks to standalone 2018-09-26 21:10:20 -04:00
Gregg Van Hove
306882f636 Merge branch 'nitobuendia-patch-1' 2018-09-25 17:29:10 -07:00
Gregg Van Hove
16fef04629 Merge branch 'patch-1' of https://github.com/nitobuendia/jasmine into nitobuendia-patch-1
- Merges #1601 from @nitobuendia
- Fixes #1594
2018-09-25 17:28:57 -07:00
Gregg Van Hove
d180c2026e Merge branch 'master' of https://github.com/Havunen/jasmine into Havunen-master
- Merges #1599 from @Havunen
2018-09-25 17:14:49 -07:00
Gregg Van Hove
92d0882a32 Introduce a configuration object to Env deprecating old single use functions
[finishes #159158038]
2018-09-25 17:08:41 -07:00
Nito Buendia
04679622b0 Add tests for formatting empty content errors. 2018-09-13 20:02:30 +08:00
Nito Buendia
b4cd1ec1ae Format according to style. 2018-09-13 19:48:53 +08:00
Nito Buendia
963b1cca22 Add tests for new unnamed errors. 2018-09-13 19:48:10 +08:00
Nito Buendia
d4f9b41eda Print error message when available
With the current set up, error message is only printed out when error name is available.
There are situations where the ErrorEvent object does not have a `name` property, but the message is still relevant.

For more details see #1594
2018-09-11 23:25:28 +08:00
Sampo Kivistö
1019b045cd Optimized clearTimeout cpu usage 2018-09-06 21:11:05 +03:00
Gregg Van Hove
6b9ae2db7e Merge pull request #1597 from limonte/patch-1
chore(package.json): http -> https
2018-09-04 12:27:05 -07:00
Limon Monte
33d8d2d3f4 chore(package.json): http -> https 2018-09-01 10:16:30 +03:00
Gregg Van Hove
12f56fdb7d bump version to 3.2.1 2018-08-14 17:19:23 -07:00
Gregg Van Hove
afa18e554c Correctly expost spyOnAllFunctions
- See #1581
2018-08-14 17:11:50 -07:00
Gregg Van Hove
7205d07c67 Merge pull request #1588 from fossabot/master
Add license scan report and status
2018-08-08 19:04:21 -07:00
Gregg Van Hove
83ba2eb4d6 Link to the correct repo in release notes 2018-08-08 17:41:24 -07:00
Gregg Van Hove
87865f00a3 Add issue links to release notes 2018-08-08 17:39:10 -07:00
Gregg Van Hove
112672c4a9 bump version to 3.2.0 2018-08-08 17:33:50 -07:00
fossabot
f05ab79731 Add license scan report and status
Signed-off-by: fossabot <badges@fossa.io>
2018-08-07 17:47:31 -07:00
Gregg Van Hove
3a52c444f8 Merge branch 'aeisenberg-spy-all'
- Merges #1581 from @aeisenberg
- Fixes #1421
2018-07-24 17:55:44 -07:00
Andrew Eisenberg
f62eb3b1a8 Add spyOnAllFunctions function
This function will spy on all writable and configurable functionss of
an object that is passed in. It can be used like this:

    spyOnAllFunctions(obj);

This commit addresses https://github.com/jasmine/jasmine/issues/1421
2018-07-20 07:58:17 -07:00
Gregg Van Hove
110c092c9e Fix regular expressions for different browsers 2018-06-18 17:55:24 -07:00
Gregg Van Hove
8bb0e2d494 Merge branch 'ikonst-set-timeout-error-message'
- Merges #1567 from @ikonst
2018-06-18 17:37:39 -07:00
Ilya Konstantinov
8c1b80daae Improve Jasmine timeout error message 2018-06-18 17:36:43 -07:00
Steve Gravrock
ac07c9ea97 Simplified ExpectationFilterChain#modifyFailureMessage 2018-06-09 12:34:30 -07:00
Steve Gravrock
0842a80c68 Cleanup 2018-06-09 12:26:34 -07:00
Gregg Van Hove
e2895a92dc Fix JSDoc naming for Env functions
- See #1565
2018-06-06 17:13:52 -07:00
Gregg Van Hove
03998c1b20 Add documentation for more public functions on Env
- Fixes #1565
2018-06-05 17:13:58 -07:00
Steve Gravrock
9472df0db4 Added a basic set of async matchers
- Fixes #1447
- Fixes #1547
2018-06-04 21:07:44 -07:00
Steve Gravrock
8a01e1f26c .withContext() works with .not 2018-06-02 22:06:53 -07:00
Steve Gravrock
321f161ce5 Made ExpectationFilterChain immutable 2018-06-02 13:57:29 -07:00
Steve Gravrock
202a677637 ExpectationFilterChain WIP 2018-06-02 13:57:07 -07:00
Gregg Van Hove
8f7327cb4d Properly cascade StopExecutionError's up the tree
- Fixes #1563
2018-05-30 17:32:14 -07:00
Gregg Van Hove
3636014917 Merge branch 'hide-grey-specs' of https://github.com/SamFare/jasmine into SamFare-hide-grey-specs
- Merges #1561 from @SamFare
2018-05-23 17:15:40 -07:00
SamFare
92d33c79c7 Implemented hiding of disabled specs 2018-05-22 13:30:33 +01:00
Steve Gravrock
e2897ce619 Added expect().withContext() to provide additional information in failure messages 2018-05-14 21:18:55 -07:00
Steve Gravrock
282c436463 Implemented matcher negation as a filter 2018-05-13 23:01:55 -07:00
Steve Gravrock
5cc22740c9 Test the public-ish interface 2018-05-13 22:48:58 -07:00
Steve Gravrock
533bda5d24 Split Expectation#wrapCompare into several smaller functions 2018-05-13 22:48:58 -07:00
Steve Gravrock
9fe9569b24 Additional tests for negated matcher failure messages 2018-05-13 22:48:20 -07:00
Steve Gravrock
e2d9eefccd Line-break long expectation failure messages
This makes failures somewhat easier to read. We still preserve whitespace
within lines to make whitespace-only failures readable, e.g.
expect('foo  bar').toEqual('foo bar'). See #296.
2018-05-12 09:42:38 -07:00
Gregg Van Hove
ced2b114e4 Better detection of DOM Nodes for equality
- Also use JSDom if a real one isn't present to get some more coverage
  there

- Fixes #1172
2018-05-04 18:01:08 -07:00
Gregg Van Hove
f7097281c9 IE doesn't support .name on a function 2018-05-03 17:34:15 -07:00
Gregg Van Hove
01a1113387 Merge branch 'yinm-fix-typo'
- Merges #1555 from @yinm
2018-05-03 17:21:18 -07:00
yinm
4d0b47ac4c Fix typo from incimplete to incomplete 2018-05-03 17:46:49 +09:00
Gregg Van Hove
d6cfc4a9b5 Merge branch 'riophae-master'
- Merges #1551 from @riophae
2018-05-02 17:52:03 -07:00
Fangzhou Li
fbcdbf5ab1 Allow omitting the name argument: createSpy(func) 2018-04-29 06:07:22 +08:00
Gregg Van Hove
7e14a97371 Explicitly pass in timing functions in mock clock integration specs
- This way we can make sure that clear stack always works no matter
  how long the suite in the spec is

[fixes #153518103]
2018-04-23 17:25:11 -07:00
Gregg Van Hove
c440d13754 Use the same global for everything in Env
- No longer use `getGlobal` for clearStack and QueueRunner
2018-04-13 17:14:48 -07:00
Gregg Van Hove
8e8f09b41f Force reinstall bundler and include firefox again 2018-04-03 17:33:20 -07:00
Gregg Van Hove
1decb14807 Ensure rubygems is up-to-date on travis
- See travis-ci/travis-ci#8969
2018-04-03 17:13:27 -07:00
Gregg Van Hove
a978f50f1d name new global status stuff correctly in API docs 2018-04-02 17:20:39 -07:00
Steve Gravrock
74287c578c Check for accidental global variable creation 2018-03-25 12:01:50 -07:00
Steve Gravrock
7f1cdc2d02 Fixed global variable leak
- Fixes #1534
2018-03-25 12:00:56 -07:00
Steve Gravrock
847a959b13 Merge branch 'handle-rejection' of https://github.com/johnjbarton/jasmine
- Merges #1521 from @johnjbarton
2018-03-24 19:49:58 -07:00
Steve Gravrock
05015a8b3e Correctly format stack traces for errors with multiline messages
- Fixes #1526
2018-03-10 12:03:08 -08:00
Steve Gravrock
6f960d8662 Merge branch 'better-array-errors' of https://github.com/majidmade/jasmine
- Merges #1527 from @majidmade
- Fixes #1485
2018-03-10 07:42:34 -08:00
Majid Razvi
11b8b59e03 Change message for extra elements at end of actual array. #1485 2018-03-10 00:05:07 -07:00
johnjbarton
f1ebe05f1d Report unhandled rejections as globalErrors.
Extend existing support for uncaughtExceptions to unhandledRejections now that many tests are async.
2018-03-01 16:47:50 -08:00
Gregg Van Hove
85b2a8c6c4 add some links to more tutorials from the api docs 2018-03-01 10:48:18 -08:00
Gregg Van Hove
557fb4ed72 proper links in release notes 2018-02-27 12:01:28 -08:00
Gregg Van Hove
ee52023b3d Bump version to 3.1 2018-02-27 11:57:20 -08:00
Gregg Van Hove
91296a44f2 Remove Safari 7 from Travis matrix 2018-02-27 11:10:07 -08:00
Gregg Van Hove
1923461b09 Ignore more browser fields when formatting Errors
- description from IE
- column from Safari
2018-02-27 09:52:19 -08:00
Gregg Van Hove
71116d3957 don't lock to 2.99 in dev 2018-02-27 09:33:10 -08:00
Gregg Van Hove
63cc7cafc8 Use Jasmine's arrayContains, instead of includes for better support 2018-02-26 17:57:37 -08:00
Gregg Van Hove
fdecf02472 Merge branch 'print_exception_properties' of https://github.com/jbunton-atlassian/jasmine into jbunton-atlassian-print_exception_properties
- Merges #1516 from @jbunton-atlassian
2018-02-26 17:48:28 -08:00
Gregg Van Hove
11f4d894a6 Merge branch 'node-load-errors'
- See #1519
2018-02-26 16:44:45 -08:00
James Bunton
1149d4edde Use j$.pp instead of JSON.stringify() for pretty printing 2018-02-27 10:22:06 +11:00
James Bunton
9ee85c35d2 Remove duplicate ignored property 2018-02-27 10:21:50 +11:00
Steve Gravrock
0367ca5294 Merge branch 'patch-closing-statement' of https://github.com/Sylhare/jasmine
- Merges #1512 from @Sylhare
2018-02-23 19:17:50 -08:00
James Bunton
763a83c833 Display error properties for failed specs 2018-02-23 14:43:47 +11:00
sylhare
7fb53dcdfa Fixing missing semi-colons 2018-02-21 09:01:24 -05:00
sgravrock
a9a112e88f Fixed release notes link 2018-02-18 21:08:52 -08:00
sgravrock
0184808a86 Updated README for 3.0 2018-02-18 21:06:51 -08:00
Steve Gravrock
1ac2a6f608 Allow node to report load time errors
[Fixes #153466462]
2018-02-17 15:45:42 -08:00
Gregg Van Hove
785f62c7a0 Fix naming and check functions for empty/notEmpty specs 2018-02-15 17:43:03 -08:00
Gregg Van Hove
d8c154a2c6 Update empty and notEmpty specs for better IE11 support 2018-02-15 17:23:44 -08:00
Gregg Van Hove
c974c4740c Merge branch 'master' of https://github.com/sjolicoeur/jasmine into sjolicoeur-master
- Merges #1460 from @sjolicoeur
2018-02-15 16:00:33 -08:00
Gregg Van Hove
2b27bd393f Add API docs for async reporters 2018-02-15 14:36:29 -08:00
Gregg Van Hove
3b77f38188 Return <anonymous> for functions that have no actual words between keyword and (
- Also fixes a potential catastrophic backtracking if someone has
severely damaged their own `toString` during test execution.
2018-02-15 12:31:10 -08:00
Steve Gravrock
11827572d3 Moved toHaveClass matcher into core so that it can be used in Karma
- Fixes #1503
2018-02-13 17:09:42 -08:00
Gregg Van Hove
8326ecf919 Merge branch 'deprecation-object' of https://github.com/UziTech/jasmine into UziTech-deprecation-object
- Merges #1498 from @UziTech
2018-02-13 16:57:24 -08:00
Gregg Van Hove
cd6a0de852 Merge pull request #1505 from codetriage-readme-bot/codetriage-badge
Add CodeTriage badge to jasmine/jasmine
2018-02-13 09:48:37 -08:00
codetriage-readme-bot
148d94558d Add CodeTriage badge to jasmine/jasmine
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/jasmine/jasmine/badges/users.svg)](https://www.codetriage.com/jasmine/jasmine)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly 8 months ago, [alopezsanchez](https://github.com/alopezsanchez) added this project to CodeTriage in order to start contributing. Since then, 2 people have subscribed to help this repo.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2018-02-13 10:29:49 -06:00
Gregg Van Hove
83beca6899 Merge branch '2.99-patch' 2018-02-09 09:32:09 -08:00
Gregg Van Hove
3c6308f1dc Don't include the specs in the ruby gem
- Bump to 2.99.2 for gem
2018-02-09 09:22:35 -08:00
Tony Brix
6193bc113b throw errors 2018-02-08 15:12:14 -06:00
Gregg Van Hove
fa6a80b76e Merge branch 'master' of https://github.com/aptx4869/jasmine into aptx4869-master
- Merges #1501 from @aptx4869
2018-02-08 10:22:36 -08:00
Gregg Van Hove
c861f6c6c2 Merge pull request #1499 from bcaudan/patch-1
Fix release note typo
2018-02-08 10:16:57 -08:00
aptx4869
4fcd4099ad Resolve merge conflict
Fixes #1500
2018-02-08 15:07:29 +08:00
Bastien Caudan
1d495587ff Fix release note typo 2018-02-08 08:02:13 +01:00
Tony Brix
c859128537 add tests 2018-02-07 23:58:26 -06:00
Tony Brix
a8a5b839ab allow adding a deprecation object 2018-02-07 22:44:32 -06:00
Gregg Van Hove
4e5d947faa Also lock for selenium runner 2018-02-07 14:58:14 -08:00
Gregg Van Hove
c2603efeb4 Specify Jasmine Gem 2.99 tag for bundle install 2018-02-07 14:55:28 -08:00
Gregg Van Hove
fbec3cc230 Only show deprecation for catch exceptions if you tell Jasmine not to catch
- Fixes #1497
2018-02-07 14:47:10 -08:00
Gregg Van Hove
1acbd1ef96 Add notes for environments that have lost support
- #1495
2018-02-07 09:19:33 -08:00
Gregg Van Hove
3d8e379fa6 bump dev dependency for npm 2018-02-06 15:37:21 -08:00
Gregg Van Hove
55267e11f6 Make sure ruby version is a string when passing to sauce labs 2018-02-06 13:37:12 -08:00
Gregg Van Hove
09a6e3714a Bump travis ruby version 2018-02-06 12:29:12 -08:00
Gregg Van Hove
8ec4d54685 no longer run specs for docs in CI 2018-02-06 11:54:25 -08:00
Gregg Van Hove
516fe68759 Merge branch '3.0-features' 2018-02-06 11:22:41 -08:00
Gregg Van Hove
4530f9431f Generate combined file with new version numbers 2018-02-06 10:33:39 -08:00
Gregg Van Hove
d4b76a4d3b version bump to 3.0 2018-02-06 09:33:49 -08:00
Gregg Van Hove
764d58a7f5 Merge branch 'master' into 3.0-features
- cleaning up 2.99 deprecations
2018-02-06 09:31:51 -08:00
Gregg Van Hove
9911d37f06 bump version to 2.99 2018-02-05 16:57:51 -08:00
Gregg Van Hove
32f99ef99d Use Jasmine's arrayContains to look for duplicate deprecations
[#154746527]
2018-02-05 14:24:14 -08:00
Gregg Van Hove
c142490c69 Add deprecation messages for things that will change/break in 3.0
[#154746527]
2018-02-05 14:01:46 -08:00
Gregg Van Hove
24bf3489dc Display deprecation warnings in HTML reporter
- Also no longer check for stack since IE doesn't do that

[#154746527]
2018-02-05 12:11:36 -08:00
Gregg Van Hove
5afe1222f4 Add ability to report deprecation warnings from within the suite
[#154746527]
2018-02-05 11:19:15 -08:00
Gregg Van Hove
274011ed03 Merge branch 'master' into 3.0-features 2018-02-02 16:33:38 -08:00
Gregg Van Hove
42e00b3bc5 Remove node modules from python wheel, and update languages
[finishes #87860474]
2018-01-31 14:23:32 -08:00
Gregg Van Hove
0eca06a33b Now pass a navigation helper to HtmlReporter instead of click handlers 2018-01-30 14:30:28 -08:00
Gregg Van Hove
84953ec210 stop spec on failure should not default to true 2018-01-30 11:48:25 -08:00
Gregg Van Hove
e15f273f06 Replace old "catch exceptions" logic with proper fail fast with error reporting
- Option is called stopOnSpecFailure

[#85966014]
- See #414
- See jasmine/jasmine-npm#16
2018-01-30 11:36:56 -08:00
Gregg Van Hove
e908b67b19 Move explicit fail spec out of mock clock context and re-add the afterAll for IEs 2018-01-29 17:05:54 -08:00
Gregg Van Hove
46cc48ccfa Detect an Error passed to done and add an expectation failure
- See #567
2018-01-29 16:46:30 -08:00
Gregg Van Hove
262a2fe674 Generate compiled jasmine.js for async reporters work 2018-01-29 14:02:02 -08:00
Gregg Van Hove
50cd6fdd68 Allow reporter callbacks to be asynchronous
[finishes #154673961]
- Fixes #842

Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-29 11:55:41 -08:00
Gregg Van Hove
341c6df6ea Fix HTML reporter display for excluded specs 2018-01-29 10:00:15 -08:00
Elenore Bastian
3df9cc26d4 Update css for new reporter status
Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
2018-01-26 15:27:35 -08:00
Gregg Van Hove
6b156ca6d1 Unify status for xdescribe and xit
- Ensure *All's only execute if at least one child will run
- Specs will report a status of `excluded` instead of disabled

[finishes #153967580]
- #1418

Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-25 16:17:31 -08:00
Elenore Bastian
07996b567f Suite level errors are reported in failures list
[#150118881]

Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
2018-01-23 15:39:11 -08:00
Gregg Van Hove
9a96396f65 Generate jasmine.js for suite reporting changes
Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-23 14:38:40 -08:00
Elenore Bastian
12a47f05bf Suite level errors all report the same way (on suiteDone)
- For `beforeAll`, `afterAll`, and declaration errors

[#150118881] #1409

Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
2018-01-23 10:15:28 -08:00
Gregg Van Hove
414e03bded Setup createSpy in all specs where needed and finish renaming params
Signed-off-by: Elenore Bastian <ebastian@pivotal.io>
2018-01-22 14:21:52 -08:00
Gregg Van Hove
038ab87252 Merge branch 'custom-spy-strategy' into 3.0-features 2018-01-22 12:12:59 -08:00
Gregg Van Hove
f20f78f82b Don't clobber previous custom plans with later plans
[finishes #37288941]
2018-01-22 12:10:24 -08:00
Gregg Van Hove
70bce55721 Bump version to 2.9.1 2018-01-19 17:51:18 -08:00
Gregg Van Hove
53529bdc9a Clear timeouts when starting to process a milli instead of at the end
- Fixes #1482
2018-01-19 17:47:28 -08:00
Gregg Van Hove
c82e5947f5 Version bump to 2.9.0 2018-01-16 17:29:34 -08:00
Gregg Van Hove
f76b452816 Correctly check for Symbols, not Sets in AnythingSpec 2018-01-12 17:45:00 -08:00
Gregg Van Hove
91aab8e1b8 Merge branch 'Volox-ie11-sets-support'
- Merges #1478 from @Volox
- Fixes #1355
2018-01-12 17:33:51 -08:00
Volonterio Riccardo
486a64658f Added complete support for Set also for IE11.
Fixes 1355
2018-01-12 12:18:35 +01:00
Gregg Van Hove
1dfdc89ba9 Merge branch 'ie11-maps-support' of https://github.com/Volox/jasmine into Volox-ie11-maps-support
- Merges #1477 from @Volox
- Fixes #1472
2018-01-11 17:50:56 -08:00
Gregg Van Hove
e2a191b116 Refactor QueueRunner and remove references to functions that Jasmine is done with
[finishes #56030214]
2018-01-11 17:20:13 -08:00
Volonterio Riccardo
085a1f8a16 Added complete support for Map also for IE11.
Fixes 1472
2018-01-11 18:13:24 +01:00
Steve Gravrock
cf2f922e30 Merge branch 'master' into 3.0-features 2018-01-10 15:28:55 -08:00
Steve Gravrock
aeeb5b7107 Bumped copyright dates 2018-01-10 10:16:02 -08:00
Steve Gravrock
170a6dce76 Made naming somewhat less confusing 2018-01-10 09:00:09 -08:00
Steve Gravrock
4934e420b2 Allow adding custom spy strategies
[#37288941]
2018-01-10 08:59:19 -08:00
Steve Gravrock
1085914a76 Extracted a SpyFactory to slim Env down a bit 2018-01-09 13:32:28 -08:00
Steve Gravrock
6f119c4e5a Moved createSpy to env so it can be stateful 2018-01-09 10:16:02 -08:00
Steve Gravrock
298b5ba127 Moved createSpyObj to env so it can be stateful 2018-01-09 09:53:45 -08:00
Steve Gravrock
16e07a0e99 Add the ability to specify the strategy to use for a spy based on which parameters are passed
[Finishes #92260826]
2018-01-03 08:49:34 -08:00
Steve Gravrock
cb6de64e58 Fixed DelayedFunctionScheduler IE 8 compatibility issue 2018-01-02 18:17:23 -08:00
Steve Gravrock
f69949ebc0 Merge branch 'fix-1426' of https://github.com/leahciMic/jasmine
- Merges #1427 from @eahciMic
- Fixes #1426
2018-01-02 08:18:32 -08:00
Michael Leaney
1136fddcde Remove .sort() and fix logic in test 2018-01-02 14:51:51 +08:00
Steve Gravrock
b943f6b736 Fixed SPEC HAS NO EXPECTATIONS warning in HTML reporter
[Finishes #153891435]
2017-12-23 11:14:37 -08:00
Steve Gravrock
b439e2fb37 Extracted results state management out of the HTML reporter
[#153891435]
2017-12-23 11:12:38 -08:00
Steve Gravrock
c79ce125c0 Merge branch 'node-timeouts' of https://github.com/chris--young/jasmine
- Merges #1470 from @chris--young
- Fixes #1469
2017-12-21 13:24:21 -08:00
Chris Young
62b815c485 Use timeout objects when in node
Fixes: https://github.com/jasmine/jasmine/issues/1469
2017-12-21 10:51:07 -08:00
Steve Gravrock
65b4499dec In Jasmine's own tests, don't leak between jasmine and jasmineUnderTest 2017-12-20 12:08:22 -08:00
Steve Gravrock
f38527ff15 Removed IE 8 compatibility cruft from HtmlReporterSpec 2017-12-19 11:29:21 -08:00
Steve Gravrock
d742ada71d Added links to re-run the suites containing a failing spec
[Finishes #25508053]
2017-12-19 11:29:18 -08:00
Steve Gravrock
b6cc34d9e9 Correctly remove spies of window.onerror on IE 2017-12-18 16:34:37 -08:00
Steve Gravrock
ef9f82a17d Merge branch 'master' into 3.0-features 2017-12-18 09:48:17 -08:00
Steve Gravrock
d3a3cf1ff3 Collapsed StringPrettyPrinter into PrettyPrinter
We never really took advantage of the potential extensibility that the
split provided, and the boundary between the two was getting muddied
over time.
2017-12-18 09:43:25 -08:00
Steve Gravrock
c0d0513199 Stop serializing objects after hitting jasmine.MAX_PRETTY_PRINT_CHARS 2017-12-15 13:23:59 -08:00
Steve Gravrock
86a38fceb9 Truncate pretty printer output that is more than j$.MAX_PRETTY_PRINT_CHARS long 2017-12-13 08:09:22 -08:00
Steve Gravrock
c74af1d900 Reduced pretty printer limits to much smaller values
This should help prevent out of memory errors when printing large object
graphs. See #1291 and #1422.

[#153257532]
2017-12-13 08:07:43 -08:00
Gregg Van Hove
8ea4c6d3a1 Update contributing for new naming of jasmineUnderTest 2017-12-11 17:25:27 -08:00
Gregg Van Hove
bdbaebc045 Update contributing for new naming of jasmineUnderTest 2017-12-11 17:24:38 -08:00
Steve Gravrock
2d33765cbf Dogfood the toHaveClass matcher
[#153567695]
2017-12-11 16:00:29 -08:00
Steve Gravrock
bb0992bf5f Added a toHaveClass matcher
[#153567695]
2017-12-11 15:59:59 -08:00
Steve Gravrock
ac5d8708b9 More informative pretty-printing of DOM elements
[Finishes ##153562618]
2017-12-11 08:25:13 -08:00
Steve Gravrock
eb93d38294 Allow jasmine-npm to handle its own load errors
[Fixes #153466462]
2017-12-08 09:17:10 -08:00
Steve Gravrock
0b5dce7d84 Removed CodeClimate badge & configuration
CodeClimate's recommendations have been a mix of irrelevant and
actively harmful for some time. The latest problem is that it applies
length and complexity requirements equally to all functions whether
they act as privacy scopes, namespaces, classes or just regular old
functions.

Static analysis tools are only worthwhile if their recommendations add
enough value to offset the cost of slogging through them -- in other
words, if the signal to noise ratio is high enough. CodeClimate hasn't
carried its own weight for a long time, and it's only gotten worse with
each recent update.
2017-12-07 21:29:59 -08:00
sjolicoeur
d90e20eb15 Added matchers: truthy, falsy, empty and notEmpty 2017-12-07 17:49:16 -08:00
Steve Gravrock
d16aa550cb Treat random= as a no-op rather than disabling randomization
[#109197518]
2017-12-01 08:45:58 -08:00
Steve Gravrock
2200dd084d Fixed build 2017-12-01 08:34:12 -08:00
Steve Gravrock
98ead94c51 Fixed spec failure on Chrome 2017-12-01 08:28:55 -08:00
Gregg Van Hove
21655a82c9 Use prototype for spy strategy for better memory management
- Also convert `identity` to a property from a method
2017-11-30 17:30:20 -08:00
Steve Gravrock
0183b1642d Removed stray debugger statement 2017-11-30 07:53:59 -08:00
Steve Gravrock
18ed34e9be Fixed failing specs 2017-11-29 09:32:12 -08:00
Steve Gravrock
f4caf27208 Fixed pending() for async/promise-returning specs
Fixes #1449.
Fixes #1450.
2017-11-29 08:57:29 -08:00
Steve Gravrock
a63172f53f expect(null).toEqual(jasmine.any(Object)) no longer passes
[Finishes #153181443]
Fixes #1255.
2017-11-29 08:10:01 -08:00
Steve Gravrock
9619acf91f Extracted the predicate version of toThrowError into its own matcher
This simplifies the signature of each matcher to something that jsdoc
can actually handle.

[Finishes #20622765]
2017-11-28 14:30:06 -08:00
Gregg Van Hove
b7e4c1e779 Remove console.js altogether
[#80410262]
2017-11-21 17:27:21 -08:00
Gregg Van Hove
e5ada1d010 Add safari 10 and update readme to include edge 2017-11-20 17:24:52 -08:00
Steve Gravrock
d35b65cf79 Set version to 3.0.0-pre 2017-11-17 14:28:20 -08:00
Steve Gravrock
db615e4186 Determine overall status in core, not reporters
[#92261606]
[#78679648]
2017-11-17 14:24:12 -08:00
Steve Gravrock
5906a2c05c Filter Jasmine frames from stack traces
[Finishes #2644992]
2017-11-13 15:49:01 -08:00
Steve Gravrock
59ad217954 Fixed bad travis.yml merge
Re-removed IE 8, IE 9, and Node 0.12.x from the testing matrix
2017-11-10 10:47:08 -08:00
Steve Gravrock
b0ec95c472 Merge branch 'master' into 3.0-features 2017-11-10 10:26:14 -08:00
Steve Gravrock
13b9e669bd Merge branch 'feature/allow-callfake-to-be-async' of https://github.com/mrlannigan/jasmine into merge-test
- Merges #1448 from @mrlannigan
2017-11-10 10:01:45 -08:00
Julian Lannigan
2eef0747a0 Added test steps for other major node versions
addresses https://www.pivotaltracker.com/story/show/152685778
2017-11-10 10:23:02 -05:00
Julian Lannigan
7ac1244f58 changed tests to work in environments that dont support async/await 2017-11-10 10:17:48 -05:00
Steve Gravrock
6ef0e93880 Revert "Removed IE 8 and 9 from the testing matrix"
In case we end doing another 2.x release.

This reverts commit 0e95b04900.
2017-11-09 20:57:01 -08:00
Julian Lannigan
2be5e0a962 Allowed async functions to be passed into spy#callFake 2017-11-09 19:59:23 -05:00
Steve Gravrock
a42f28c734 Removed checks for PhantomJS 1
v2 has been out for a long time, and v1 can no longer be easily installed.
2017-11-09 07:04:06 -08:00
Steve Gravrock
d58f3dac56 Test against multiple Node versions on Travis 2017-11-08 09:17:55 -08:00
Steve Gravrock
676689b063 Test against Node 4.x, not 0.10.x 2017-11-08 09:11:41 -08:00
Steve Gravrock
aaf226b9e3 Removed spec guards for versions of Safari we no longer support 2017-11-08 08:30:35 -08:00
Steve Gravrock
419470e9df Removed support for IE <10
[#150527985]
2017-11-08 08:30:22 -08:00
Steve Gravrock
1526d5e2a8 Treat afterAll errors at any level as failures
[Finishes #152492514]
2017-11-07 20:48:23 -08:00
Steve Gravrock
a3cb010971 Removed remaining traces of the obsolete console reporter
[#80410262]
2017-11-07 20:09:04 -08:00
Steve Gravrock
278ef9228b Removed obsolete console reporter from core
Anyone who was still using this should use the one in jasmine-npm
instead.

[Finishes #80410262]
2017-11-07 12:25:47 -08:00
Steve Gravrock
82eeed3c85 Improved reporting of load errors and afterAll errors
- Pass file and line number to reporters when present
- Show file and line number in the HTML reporter when present
- Visually separate adjacent errors in the HTML reporter

[#24901981]
2017-11-04 10:28:42 -07:00
Steve Gravrock
ae9b95269c Load error handling doesn't depend on browser features, so test it everywher
[#24901981]
2017-11-02 18:17:40 -07:00
Steve Gravrock
285f06d5c4 Merge branch 'promise-matching-1314' of https://github.com/sderickson/jasmine 2017-11-02 17:18:24 -07:00
Steve Gravrock
3aece2ac74 Merge branch 'master' of https://github.com/b-3-n/jasmine
- Merges #1445 from @b-3-n
- Fixes #1444
2017-11-02 08:17:27 -07:00
sgravrock
3a9d4ee08d Merge pull request #1440 from aaronang/patch-1
Add instruction to sync local master with upstream
2017-11-02 08:11:47 -07:00
Steve Gravrock
26a7bc6acf Report loading errors as loading errors, not afterAll errors
[#24901981]
2017-11-01 14:09:29 -07:00
Steve Gravrock
7b8edcb401 HTML reporter reports overall failure if there are any global errors
[#24901981]
2017-11-01 11:44:58 -07:00
Steve Gravrock
395b2b2d97 Test against Edge 2017-10-31 21:50:42 -07:00
Steve Gravrock
bd250f27c7 Fail if error events (e.g. syntax errors) occur during loading
[#24901981]
2017-10-31 21:16:00 -07:00
Benjamin Mularczyk
b4dfdd7a48 Fix equality computation for ES6 Sets. 2017-11-01 01:01:26 +01:00
Steve Gravrock
12ed3bfacd Allow use of a predicate function to validate thrown exceptions
[Finishes #20622765]
2017-10-30 08:51:25 -07:00
Steve Gravrock
324ad0073e Refactored toThrowMatching to facilitate adding more strategies
* Extracted sub-matchers for the two major existing strategies
  (matching all errors, and matching by type and/or message)
* Reduced the use of mutable state
2017-10-30 08:51:25 -07:00
Steve Gravrock
9f7a6ef061 Check truthiness of toThrowError args, not arg count
This enables some useful simplifications at the cost of making it
impossible (for now) to expect a function to throw an error with a falsy
message.

[#20622765]
2017-10-30 08:51:25 -07:00
sgravrock
908583c49b Point CodeClimate at the right repo 2017-10-30 08:51:25 -07:00
Steve Gravrock
e31db20ec7 Default to running tests in random order
[Finishes #109197518]
2017-10-27 08:50:40 -07:00
Aaron Ang
c260c67e7e Add instruction to sync local master with upstream 2017-10-26 04:56:44 -07:00
sgravrock
554d0efab7 Point CodeClimate at the right repo 2017-10-25 11:28:47 -07:00
Steve Gravrock
ea3cf14ef8 Exclude specs from CodeClimate ratings
CodeClimate makes recommendations that, while helpful for production
code, can be harmful for test code. In particular, following its
recommendations would lead us to aggressively de-duplicate even small
amounts of test setup code. That can create unwanted coupling, obscure
the intent of the tests, and make it harder to maintain tests as their
setup needs diverge.
2017-10-25 09:25:52 -07:00
Steve Gravrock
a4bdd47a8a Merge branch 'unittests' of https://github.com/voithos/jasmine
- Merges #1437 from @voithos
2017-10-25 08:49:58 -07:00
Zaven Muradyan
89306551a0 Add some unit tests that exercise jasmine.anything() and Map matching.
Follow-up to some recent commits that fixed issues around
jasmine.anything() matching. This simply adds some extra tests that
exercise usage of Symbols with jasmine.anything() and as Map keys.
2017-10-24 22:39:31 -07:00
Steve Gravrock
0e95b04900 Removed IE 8 and 9 from the testing matrix
[#150527985]
2017-10-24 08:39:00 -07:00
Steve Gravrock
da91294182 Merge branch 'anything-fix' of https://github.com/voithos/jasmine
- Merges #1436 from @voithos
2017-10-24 08:26:13 -07:00
Steve Gravrock
bd41a97cd5 Merge branch 'anysymbol-fix' of https://github.com/voithos/jasmine
- Merge #1435 from @voithos
2017-10-24 08:18:42 -07:00
Zaven Muradyan
6d3953356d Add special handling of asymmetric matcher objects as keys in Maps.
The previous Map equality code was assuming that the set of keys would
be identical between the two Maps. This change adds insertion-order
tracking for each key with its corresponding key. If one of the two keys
is an asymmetric equality obj, the keys are eq()'d, and if it succeeds,
the corresponding values are compared. Otherwise, the "main" key is
looked up directly in the other object; this is to prevent
similar-looking obj keys with different obj identities from comparing
equal.

Fixes #1432.
2017-10-23 23:01:50 -07:00
Zaven Muradyan
62f769767a Add support for jasmine.any(Symbol).
The original asymmetric matcher code for Any did not work with symbols
since `symbolInstance instanceof Symbol` is actually `false` (but,
`symbolInstance.constructor` is `Symbol). This simply adds an extra
clause that explicitly checks for symbol (if available) like the other
primitive types.

Also added some missing specs for other types, like Map, Set, etc.

Fixes #1431.
2017-10-23 20:07:56 -07:00
Steve Gravrock
03f7f76bca Removed Safari 6 from the test matrix
Sauce Labs no longer supports Safari <7.
2017-10-23 12:05:52 -07:00
Steve Gravrock
4c6dadb9b1 Merge branch 'github-1295' of https://github.com/ksvitkovsky/jasmine
- Merges #1411 from @ksvitkovsky
2017-10-23 11:58:30 -07:00
Gregg Van Hove
8973e4e44f Ignore package-lock.json
We want to make sure that Travis checks against the latest version of
our dependencies, and also maintain compatibility across multiple
versions of Node.

Signed-off-by: Steve Gravrock <sgravrock@pivotal.io>
2017-10-23 11:53:48 -07:00
Steve Gravrock
b7e9594c86 Merge branch 'jasmine-deep-clone-args' of https://github.com/aj-dev/jasmine
- Merges #1424 from @aj-dev
2017-10-23 11:32:58 -07:00
Steve Gravrock
6c363f11b3 Merge branch 'lintfix' of https://github.com/voithos/jasmine
- Merges #1428 from @voithos
2017-10-23 11:01:18 -07:00
sgravrock
0f650e1d03 Merge pull request #1429 from voithos/docfix
Fix "Before Committing" section of CONTRIBUTING.md.
2017-10-23 10:46:06 -07:00
Zaven Muradyan
78fe42ac2d Fix "Before Committing" section of CONTRIBUTING.md.
The old contributing docs had a misaligned nested unordered-list, which
resulted in it creating a new list instead of being nested under its
parent.

It also seems like it would be useful to have the "revert your changes"
prose as part of the "Before Committing" section, since otherwise people
may miss it and have to amend.
2017-10-15 22:48:57 -07:00
Zaven Muradyan
20d86b2a00 Fix lint warning in CallTracker.
The previous code was using `== null` to handle both `null` and
`undefined`, resulting in a jshint warning. The conditional is meant to
check for non-primitive values, and it happens to be the case that a
falsey value in JS is always a primitive, or `null` or `undefined`.
2017-10-15 12:31:54 -07:00
Michael Leaney
516e00d7ba Fix #1426 clearTimeout not correctly clearing a timeout
clearTimeout was not correctly handling the case of clearing a
timeout that is also scheduled to run at the same tick.

This fix adds a deletedKeys array that is checked whilst we are
running the scheduled functions for the current clock tick. If
a function exists in deletedKeys it will not be ran. deletedKeys
is then reset to an empty array.
2017-10-11 20:54:56 +08:00
Michael Leaney
c1957ecd7c Add test 2017-10-11 20:29:27 +08:00
Audrius Jakumavicius
1f6c91de7c Deep clone args before passing them to reporters 2017-10-07 01:32:39 +02:00
Gregg Van Hove
f6342ad4fe Add a note about defineProperty for spyOnProperty
- Fixes #1415
2017-08-24 12:22:11 -07:00
Gregg Van Hove
8cf8736cab bump version to 2.8.0 2017-08-24 11:41:41 -07:00
Gregg Van Hove
6d0f0ed915 Only use the extra setTimeout outside of IE8. 2017-08-10 16:38:13 -07:00
ksvitkovsky
7ca571a746 Remove runnable parameter for simplicity 2017-08-10 23:08:59 +04:00
ksvitkovsky
4240b3514b Check runnable instead of suite 2017-08-10 22:58:30 +04:00
ksvitkovsky
ab116fbd0f Throw an error on nested methods 2017-08-10 22:05:13 +04:00
ksvitkovsky
da2673e02f Test nested methods to throw an error 2017-08-10 22:05:13 +04:00
Gregg Van Hove
b2dee5cb1c Create CODE_OF_CONDUCT.md 2017-08-10 10:38:05 -07:00
Gregg Van Hove
1414281cff Merge branch 'github-1221' of https://github.com/ksvitkovsky/jasmine into ksvitkovsky-github-1221
- Merges #1412 from @ksvitkovsky
- Fixes #1221
2017-08-09 17:20:54 -07:00
Gregg Van Hove
2588b442e6 Integration specs that actually execute a suite need to be async 2017-08-09 11:51:26 -07:00
Gregg Van Hove
af41e5ea5c Properly wait until test env has completed before moving on. 2017-08-09 11:43:55 -07:00
Gregg Van Hove
8834142198 Update jsApiReporter docs to link to new suite and spec results 2017-08-09 10:36:53 -07:00
Gregg Van Hove
1926fc11ae Add jsdocs for reporter events 2017-08-09 10:21:59 -07:00
ksvitkovsky
e7049d3183 Add 'nothing' matcher and tests 2017-08-09 16:44:19 +04:00
Gregg Van Hove
80dba1138a Add explicit docs for the callback function passed to it etc. 2017-08-08 17:28:36 -07:00
Gregg Van Hove
9811ff71d2 Update afterAll documentation
- See jasmine/jasmine.github.io#76
2017-08-08 14:37:45 -07:00
Gregg Van Hove
301dd4f6b5 Merge branch 'kiewic-kiewic/toEqualArrayDiff'
- Closes #1375 from @kiewic
2017-08-08 09:55:32 -07:00
Gilberto Stankiewicz
090a6234c3 Make toEqual matcher report the difference between array elements when arrays have different length 2017-08-08 09:55:17 -07:00
Gregg Van Hove
8ad9abb19a Add arrayWithExactContents asymmetric matcher
- Fixes #817
2017-08-04 12:07:09 -07:00
Gregg Van Hove
8c0a8a1b33 Merge branch 'ksvitkovsky-github-1388'
- Closes #1408 from @ksvitkovsky
- Fixes #1388
2017-08-04 10:27:55 -07:00
ksvitkovsky
1db81c334d Ensure no message added on asym. match success 2017-08-04 10:26:51 -07:00
Gregg Van Hove
8dd0ad531c Merge branch 'ksvitkovsky-github-1403'
- Closes #1407 from @ksvitkovsky
- Fixes #1403
2017-08-04 09:55:09 -07:00
ksvitkovsky
f58002f0a6 Better primitives detection for saveArgsByValue 2017-08-04 09:40:42 -07:00
Gregg Van Hove
4d18e63b0f Merge branch 'ksvitkovsky-github-1180'
- Closes #1404 from @ksvitkovsky
- Fixes #1180
2017-08-04 09:34:16 -07:00
ksvitkovsky
4fc177d5ae Better pretty printing for typed arrays 2017-08-04 09:33:05 -07:00
Gregg Van Hove
acc8c23bf4 Merge branch 'theefer-fix-map+set-comparison'
- Merges #1406 from @theefer
- Fixes #1402
2017-08-04 09:23:31 -07:00
Sébastien Cevey
fc6ee243e9 Rewrite ES6 Set and Map comparison to ignore insertion order 2017-08-02 15:22:33 +01:00
Gregg Van Hove
b256741bec bump version to 2.7.0 2017-07-27 17:47:20 -07:00
Gregg Van Hove
1d4a2b5c22 Merge branch 'user-context' of https://github.com/darthjee/jasmine into darthjee-user-context
- Merges #1400 from @darthjee
2017-07-26 17:18:02 -07:00
darthjee
b0aac6b852 Add class UserContext 2017-07-26 23:40:22 +02:00
Gregg Van Hove
543e056056 Merge branch 'jberney-master'
- Merges #1399 from @jberney
2017-07-24 17:13:21 -07:00
Jonathan
7dfc5f506c Send unfocused tests through the same queue as focused tests 2017-07-23 09:01:15 -07:00
Gregg Van Hove
4cce7263c4 Update github issue and PR templates 2017-07-22 09:34:58 -07:00
Gregg Van Hove
31164106e5 Get the casing right for IE8 2017-07-18 21:51:32 -07:00
Gregg Van Hove
f71218a44b Allow IE8 to be weird when pretty printing 2017-07-18 21:07:38 -07:00
Gregg Van Hove
22e9d6df20 PrettyPrinter allows an object to have a toString that isn't a function
- Fixes #1389
2017-07-17 22:01:06 -07:00
Scott Erickson
6ddf64568e Add Promise checking to eq
Fixes #1314
2017-06-26 19:10:19 -07:00
Alpha Chen
aa72b0b7cf Simplified rounding code in toBeCloseTo
Signed-off-by: Steve Gravrock <sgravrock@pivotal.io>
2017-06-26 10:22:54 -07:00
Alpha Chen
9f3952ff87 Merge branch 'vanduynslagerp-fix-tobecloseto'
- Fixes #1382

Signed-off-by: Alpha Chen <achen@pivotal.io>
2017-06-26 10:21:13 -07:00
Pierre Vanduynslager
c604012793 Fix rounding in toBeCloseTo 2017-06-25 16:59:24 -04:00
Gregg Van Hove
6aa069d586 IE 8&9 use setTimeout to clearStack so mock clock gets tricky 2017-06-20 10:29:19 -07:00
Steve Gravrock
585287b9d6 When stop on failure is enabled, skip subsequent it() and beforeEach().
Note: afterEach() functions are still run, because skipping them is
highly likely to pollute specs that run after the failure.

[Finishes #92252330]

- Fixes #577
- Fixes #807
2017-06-19 13:48:43 -07:00
Gregg Van Hove
de862f8133 Only clear out the spec param for Run all link
- Fixes #1369
2017-06-16 14:07:40 -07:00
Gregg Van Hove
4e3ae726aa Bump version to 2.6.4 2017-06-16 13:44:43 -07:00
Steve Gravrock
9ee7b4ee0b Don't setTimeout() every time the stack is cleared via MessageChannel() 2017-06-16 09:58:41 -07:00
Gregg Van Hove
2e737f50ca Don't use window 2017-06-15 14:32:18 -07:00
Gregg Van Hove
c60d669940 Break into a setTimeout every once in a while
- Allows the CPU to run other things that used the real `setTimeout`

- Fixes #1327
- See #1334
- Fixes jasmine/gulp-jasmine-browser#48
2017-06-15 14:24:40 -07:00
Gregg Van Hove
4c491b2dc0 Pretty printer will now use MAX_PRETTY_PRINT_ARRAY_LENGTH for objects
- Fixes #1291
- Fixes #1360
2017-06-14 13:36:35 -07:00
Gregg Van Hove
f9d1e2f280 Merge branch 'EsrefDurna-master'
- Merges #1368 from @EsrefDurna
2017-06-12 14:03:11 -07:00
Esref Durna
270475bc61 updated package glob from 7.0.5 to 7.1.2
Npm link :  https://www.npmjs.com/package/glob
 Repository link : https://github.com/isaacs/node-glob/releases
2017-06-12 00:35:07 +00:00
Gregg Van Hove
acb9989178 Merge branch 'patch-1' of https://github.com/kant/jasmine into kant-patch-1
- Fix bower.json url to be https instead of http
- Merges #1365 from @kant
2017-06-07 14:22:24 -07:00
Gregg Van Hove
1fe1bbb6ed Merge branch 'master' of https://github.com/beatrichartz/jasmine into beatrichartz-master
- Merges #1362 from @beatrichartz
2017-06-07 14:16:48 -07:00
Gregg Van Hove
994878e6f6 bump version to 2.6.3
- cherry-pick release notes, etc.
2017-06-07 14:15:21 -07:00
Steve Gravrock
f7c160d716 Fixed HTML snippet in README
Closes #1366.
2017-06-06 15:57:45 -07:00
Gregg Van Hove
578f63b9bd Make sure the queue runner goes async for async specs
- Even if `done` is called synchronously.

See #1327 #1334 jasmine/gulp-jasmine-browser#48
2017-06-06 14:29:02 -07:00
Darío Hereñú
b1190eefb9 Minor fix 2017-06-04 00:40:53 -03:00
Beat Richartz
271908a2c4 Fail when one of the arguments passed into toBeCloseTo matcher is null 2017-06-02 15:36:39 +01:00
Gregg Van Hove
3372af1cf1 Merge branch 'seed-reporting' of https://github.com/sgravrock/jasmine into sgravrock-seed-reporting
- Merges #1348 from @sgravrock
2017-05-23 14:12:49 -07:00
Gregg Van Hove
d355fa0806 Don't tick extra. It's breaking IE 8 & 9 2017-05-22 14:27:08 -07:00
Steve Gravrock
56a79bef98 Use a less ancient Node on Travis CI 2017-05-19 15:47:54 -07:00
Gregg Van Hove
2ea4e9507c Merge branch 'map-support' of https://github.com/rmehlinger/jasmine into rmehlinger-map-support
- Merges #1340 from @rmehlinger
- Fixes #1257
2017-05-19 14:19:14 -07:00
Gregg Van Hove
c848a66faa Merge branch 'promises' of https://github.com/sgravrock/jasmine into sgravrock-promises
- Merges #1356 from @sgravrock
- Fixes #1336
- Fixes #1270
- Fixes #1350
- Fixes #1320
2017-05-19 14:03:21 -07:00
Gregg Van Hove
99fd7ddb88 Update python release instructions
- so I don't have search my bash history
2017-05-17 17:35:23 -07:00
Gregg Van Hove
5d1d19f494 Bump version to 2.6.2 2017-05-17 17:24:16 -07:00
Steve Gravrock
4f49288f31 Built distribution
- Fixes #1327
- Fixes jasmine/gulp-jasmine-browser#48
2017-05-16 14:36:35 -07:00
Steve Gravrock
b9adc76dc7 Clear the stack if onmessage is called before the previous invocation finishes 2017-05-16 14:08:58 -07:00
Steve Gravrock
9672689d40 Added support for ES2017 async functions 2017-05-12 14:42:14 -07:00
Steve Gravrock
a237ac5386 Added support for async before/it/after functions that return promises 2017-05-11 14:31:09 -07:00
Gregg Van Hove
5ac3e21abb Merge branch 'interleaved-suites' of https://github.com/sgravrock/jasmine into sgravrock-interleaved-suites
- Merges #1352 from @sgravrock
- Fixes #1344
- Fixes #1349
2017-05-10 13:49:05 -07:00
Steve Gravrock
88763012e4 Unified async and async queueable function running code 2017-05-10 10:14:47 -07:00
Steve Gravrock
b1e97cfb09 Correctly route errors that occur while a QueueRunner is clearing stack
Besides surfacing the error in the hopefully-correct place, this also
prevents the queue runners for sibling suites from interleaving, which
in turn prevents all kinds of internal state corruption.

Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
2017-05-09 15:01:18 -07:00
Gregg Van Hove
8e5823c0d2 Merge branch 'sgravrock-global-errors-rethrow'
- Merges #1347 from @sgravrock
2017-05-08 14:15:34 -07:00
Steve Gravrock
e6a7932ec1 Report the random seed at the beginning and end of execution
This allows reporters to provide the seed to the user even in cases
where Jasmine crashes before completing.
2017-05-08 12:09:17 -07:00
Steve Gravrock
10f1220e55 Don't mask errors that occur when no handlers are installed
It's possible for async code to cause an error when Jasmine
doesn't have any listeners registered internally. This causes
Jasmine to crash (Node) or log to the console (browser)
because of trying to call the nonexistent handler. This change
doesn't fix the overall problem but it does ensure that the
original error is logged rather than Jasmine's internal error.
2017-05-08 11:09:32 -07:00
rmehlinger
5ee03f02ed Add ES6 map support to Jasmine 2017-05-01 00:12:48 -07:00
Gregg Van Hove
2835ca3cce Bump version to 2.6.1 2017-04-26 14:18:15 -07:00
Gregg Van Hove
120c484419 Merge branch 'patch-1' of https://github.com/reinrl/jasmine into reinrl-patch-1
- Merges #1319 from @reinrl
2017-04-26 14:06:18 -07:00
Gregg Van Hove
1d62504534 Check for process.listeners as well, for GlobalErrors
- Fixes #1333
2017-04-26 13:54:07 -07:00
Gregg Van Hove
055d88eff8 Merge branch 'UziTech-ensure-function-or-undefined'
- Merges #1329 from @UziTech
- Fixes #1328
2017-04-26 13:50:11 -07:00
Tony Brix
d2b33e0c66 allow undefined as function 2017-04-26 13:49:13 -07:00
Gregg Van Hove
0c7f36a181 Merge branch 'UziTech-remove-evil'
- Merges #1330 from @UziTech
- Fixes #1325
2017-04-26 13:36:06 -07:00
Tony Brix
686d8157e5 remove eval to create spy wrapper 2017-04-26 13:34:32 -07:00
Gregg Van Hove
b771c083cb No longer try to use nextTick since node.js gets upset 2017-04-25 14:38:09 -07:00
Gregg Van Hove
fbd2ffc08b Build distribution for keys lookup fix 2017-04-25 14:35:58 -07:00
Gregg Van Hove
b3c8fb9797 Merge branch 'seanparmelee-keys-fix'
- Merges #1326 from @seanparmelee
- Fixes #1321
- Fixes #1324
2017-04-25 13:47:53 -07:00
Sean Parmelee
ef3cfe7f44 skip the test when we can’t get the propertyDescriptor 2017-04-25 12:27:32 -05:00
Sean Parmelee
0d6ecbec17 iterate through keys with a regular for loop 2017-04-25 11:28:16 -05:00
Rich Rein
7e4b8d4531 Update README.md
Made installation instructions more version-agnostic (using {#.#.#} instead of what was hard-coded to 2.0.0), corrected example HTML file (../jasmine-core/... instead of ../jasmine-2.0.0/... in the paths for the core files).
2017-04-24 12:43:40 -05:00
Gregg Van Hove
4b696fbf26 Bump version to 2.6.0 2017-04-19 14:14:39 -07:00
Gregg Van Hove
74511f5425 Merge pull request #1316 from rachelcarmena/update-introduction-url
Updating introduction url to last version
2017-04-17 13:51:33 -07:00
Rachel
3e912f7f4e Updating introduction url to last version 2017-04-17 20:30:13 +02:00
Gregg Van Hove
19b83a7434 Throw a recognizable Error message when fail outside of a spec.
Fixes #1017
2017-04-11 12:02:29 -07:00
Gregg Van Hove
98569ba0f3 Cache installed gems, so they don't need to be installed every time.
- See https://docs.travis-ci.com/user/caching/#Caches-and-build-matrices
2017-04-10 13:52:24 -07:00
Gregg Van Hove
7f11ecb62e Merge branch '1123-custom-error' of https://github.com/deckar01/jasmine into deckar01-1123-custom-error
- Merges #1298 from @deckar01
- Fixes #1123
2017-04-10 13:47:31 -07:00
Gregg Van Hove
97f8db0616 Merge branch 'gdborton-afterAll-order'
- Merges #1312 from @gdborton
- Fixes #1311
2017-04-10 13:37:04 -07:00
Gary Borton
50880fcff7 [lifecycle hooks] Make afterAll hooks operate in the fashion as afterEach.
It was discovered that afterAll hooks run in the same order that you add them,
while afterEach hooks were running in reverse order.  This commit makes their
order consistent, and adds regression tests.

Relevant issue - https://github.com/jasmine/jasmine/issues/1311
2017-04-10 07:03:37 -07:00
Gregg Van Hove
ddcae84480 Merge branch 'issue-1294' of https://github.com/toubou91/jasmine into toubou91-issue-1294
- Merges #1300 from @toubou91
- Fixes #1294
2017-04-07 17:42:17 -07:00
Gregg Van Hove
9d6a95d9ba Merge pull request #1301 from toubou91/gitignore-update
Gitignore update
2017-04-07 17:28:39 -07:00
Thodoris Bais
0d3b2b2f8e Added iml files to gitignore 2017-04-04 07:20:10 +02:00
Thodoris Bais
08f046c24c Added infinity methods, with tests 2017-03-27 00:04:43 +02:00
Jared Deckard
90c87140ac Expect an undefined error to be passed to the expectation result 2017-03-24 14:50:54 -05:00
Jared Deckard
25d9a396aa Test that custom matchers can supply custom errors 2017-03-24 14:12:33 -05:00
Jared Deckard
c42b1972e2 Allow the matcher provide a custom error message 2017-03-24 14:12:33 -05:00
Gregg Van Hove
7f8f2b5e7a Update jsDocs to something close to full coverage for public API
- #596
2017-03-23 12:20:08 -07:00
Gregg Van Hove
9cb2f06aa6 Add a first pass at jsdoc.
[##130415655] #596
2017-03-21 11:36:41 -07:00
Gregg Van Hove
a37b6c0d32 Merge branch 'master' of https://github.com/mmmichl/jasmine into mmmichl-master
- Merges #1283 from @mmmichl
2017-03-14 17:50:28 -07:00
Gregg Van Hove
5533d1a920 Fix casing for PhantomJS is userAgent check 2017-03-14 14:43:44 -07:00
Gregg Van Hove
75e652d6a7 Cleanup toThrowError constructor lookup to work in older IE
- Also use the existing browser detection for phantom
2017-03-14 14:26:17 -07:00
Gregg Van Hove
e1f7ca51da Merge branch 'issue-1252' of https://github.com/anseki/jasmine into anseki-issue-1252
- Merges #1275 from @anseki
- Fixes #1252
2017-03-10 14:36:22 -08:00
Gregg Van Hove
538ae7b9ac Merge branch 'foretagsplatsen-toHaveBeenCalledBefore' 2017-03-10 09:57:21 -08:00
Gregg Van Hove
2ea41d3e27 Merge branch 'toHaveBeenCalledBefore' of https://github.com/foretagsplatsen/jasmine into foretagsplatsen-toHaveBeenCalledBefore
- Merges #1242 from @DamienCassou
2017-03-10 09:57:03 -08:00
Gregg Van Hove
bd9ae3a25b Fix syntax error 2017-03-07 17:05:12 -08:00
Gregg Van Hove
1042c9a2dd Collect unhandled exceptions and pass them to the current runnable
Fixes #529
Fixes #937
2017-03-07 16:32:11 -08:00
Gregg Van Hove
92e7436db2 Make sure the unlink is explicitly synchronous 2017-03-07 14:07:37 -08:00
Gregg Van Hove
74fe7fb85b Only have code climate grade the src 2017-03-01 16:29:10 -10:00
Gregg Van Hove
7e0fd79b3b Exclude some more stuff from codeclimate 2017-03-01 16:18:40 -10:00
mmmichl
8807bbb850 Pretty print objects passed to fail method
Fixes #1090
2017-02-26 19:25:02 +01:00
Damien Cassou
c93f35fbc8 fixup! Add toHaveBeenCalledBefore matcher 2017-02-20 10:55:23 +01:00
Damien Cassou
4cfdd06700 Add toHaveBeenCalledBefore matcher
This matcher makes sure the 'actual' spy is called before the
'expected' spy.

This code has been written in cooperation with Benjamin Van Ryseghem.
2017-02-20 09:52:14 +01:00
anseki
19b89d437e Skip a spec in PhantomJS that has bugs about iframe 2017-02-16 14:50:24 +09:00
Gregg Van Hove
43f96d3ecd Update gem authors 2017-02-15 17:00:17 -08:00
Gregg Van Hove
ac42bd9b35 More emeritus maintainers 2017-02-15 16:54:28 -08:00
Gregg Van Hove
9fbd0ba551 Nicer error messages for spyOn when null is provided
Fixes #1258
2017-02-15 15:55:27 -08:00
Gregg Van Hove
52876a7bf2 Merge branch 'bugfix-non-fn-args' of https://github.com/voithos/jasmine into voithos-bugfix-non-fn-args
- Merges #1222 from @voithos
- Fixes #1004
2017-02-15 15:18:50 -08:00
Gregg Van Hove
2eec3427e8 Re-generate files for new year in copyright
- Also read from env variable for sauce connect path
2017-02-15 15:15:58 -08:00
anseki
ed23254865 fix #1252 2017-02-10 17:17:39 +09:00
Gregg Van Hove
137e7e94d3 Merge pull request #1249 from Scottkao85/patch-1
Update MIT.LICENSE for new year
2017-01-02 12:14:44 -08:00
Gregg Van Hove
923b8fe9c4 Merge pull request #1248 from Nebojsaa/patch-1
Update README.md for new year
2017-01-02 12:14:27 -08:00
Scott Kao
61cc1eec66 Update MIT.LICENSE
update copyright year to 2017
2017-01-02 10:52:58 -08:00
Nebojsa Komnenovic
04be4c4583 Update README.md 2017-01-02 16:13:17 +01:00
Zaven Muradyan
b59ac96b51 Require arguments to beforeEach, it, etc, to be actual functions 2016-12-27 23:53:35 -08:00
Gregg Van Hove
be6ff8b24c Remove unused message param from Suite#pend
- See #1132
2016-12-02 10:08:39 -08:00
Gregg Van Hove
da2005fe97 Merge branch 'beforeall-in-xdescribe' of https://github.com/voithos/jasmine into voithos-beforeall-in-xdescribe
- Merges #1225 from @voithos
- Fixes #1175
2016-12-02 09:56:36 -08:00
Ben Christel
41a813521b Fix tests for toEqual diff output in IE
- Merges #1236 from @benchristel
2016-11-30 15:34:39 -08:00
Gregg Van Hove
54e7a82ef3 Merge branch 'benchristel-eq-diffs'
- Merges #1163 from @benchristel
- Fixes #675
2016-11-16 18:01:42 -08:00
Ben Christel
d5e6bf47ed Make toEqual matcher report the difference between objects
- Mismatches deep within object/array structures are pinpointed with a JsonPath-like syntax.
2016-11-14 22:08:34 -08:00
Gregg Van Hove
5a76e59d5b Merge branch 'spyOnProperty2' of https://github.com/celluj34/jasmine into celluj34-spyOnProperty2
- Merges #1203 from @celluj34
- Merges #1008 from @smacker
- Fixes #943
2016-11-04 14:36:56 -07:00
Gregg Van Hove
f5cfa2a4c1 Merge branch 'master' of https://github.com/d-reinhold/jasmine into d-reinhold-master
- Merges #1046 from @d-reinhold
- Fixes #510
2016-11-04 10:29:09 -07:00
Zaven Muradyan
c21bdaf35d Fix bug where before/afterAll were being executed in disabled suites. 2016-10-23 20:40:58 -07:00
Pivotal
369e8cc08b Merge branch 'mockMethodsShortcut' of https://github.com/mbildner/jasmine into mbildner-mockMethodsShortcut
- Merges #1101 from @mbildner
2016-10-17 15:53:05 -07:00
Gregg Van Hove
0e9b9a11c3 Fix tests for new stack clearing in IE 2016-10-14 15:53:00 -07:00
Gregg Van Hove
9750ae59e7 Update env integration specs now that we're really async 2016-10-14 10:13:27 -07:00
Gregg Van Hove
2f01f64249 Build distribution for clear stack implemenation 2016-10-14 09:48:11 -07:00
Gregg Van Hove
17c89c69d6 Separate clear stack and run it after each spec
[finishes #50197985][fix #109418332]
- Fixes #985
- Fixes #945
- Fixes #366
2016-10-14 09:21:49 -07:00
Gregg Van Hove
d85d6dd4b8 Now that it's valid syntax, make the specs work right with for 2016-09-28 12:19:18 -07:00
Gregg Van Hove
ff85714b24 syntax for a for loop is different than forEach 2016-09-28 11:52:18 -07:00
Gregg Van Hove
0d1a9a72d9 Fix spy arity stuff to work in IE8 2016-09-28 11:49:07 -07:00
Gregg Van Hove
63cc6687ff require newer jasmine-npm 2016-09-28 11:04:01 -07:00
Gregg Van Hove
75a5681c5e Merge branch 'kapke-spy-arity-preservation' 2016-09-28 10:52:17 -07:00
Gregg Van Hove
9df1edbdc9 Use the passed in env to pend browsers so IE8 works 2016-09-28 10:40:53 -07:00
Gregg Van Hove
5279e7a8c4 Checking for Set isn't browser dependant 2016-09-27 16:11:43 -07:00
Gregg Van Hove
c2e2bd7c91 Merge branch 'spy-arity-preservation' of https://github.com/kapke/jasmine into kapke-spy-arity-preservation
- Merges #1055 from @kapke
- Fixes #991
2016-09-27 15:42:45 -07:00
Gregg Van Hove
bad9c63bf7 Properly skip Set tests in browsers that don't really support it 2016-09-27 15:36:01 -07:00
Gregg Van Hove
05097b3e42 Merge branch 'set-equality' of https://github.com/alur/jasmine into alur-set-equality
- Merges #1067 from @alur
2016-09-27 13:37:57 -07:00
Gregg Van Hove
1efed4c156 Update pretty print specs to work in IE8 2016-09-27 12:26:02 -07:00
Gregg Van Hove
f4849f6401 Merge branch 'pretty-print-cross-frame-objects' of https://github.com/thatfulvioguy/jasmine into thatfulvioguy-pretty-print-cross-frame-objects
- Merges #1091 from @thatfulvioguy
- Fixes #1087
2016-09-27 11:40:01 -07:00
Gregg Van Hove
ec2ae4d521 Merge branch 'custom-testers-in-asymmetric-matchers' of https://github.com/joeyparrish/jasmine into joeyparrish-custom-testers-in-asymmetric-matchers 2016-09-27 11:01:45 -07:00
Greg Cobb
ac3d64cf84 Merge pull request #1215 from mattc41190/patch-1
Fix bad url
2016-09-22 23:03:49 -07:00
Matthew Cale
2d3c8c9f26 Fix bad url
Current README returns 404 when contributors guide is clicked.
2016-09-22 21:23:35 -05:00
Gregg Van Hove
6816bc4252 Update to 2.5.2 2016-09-16 17:19:59 -07:00
Gregg Van Hove
04bb56a5b5 Allow currently registered reporters to be cleared
- jasmine/jasmine-npm#88
2016-09-16 16:02:08 -07:00
Greg Cobb
ed31b9b844 Add ISSUE_TEMPLATE for github issues 2016-09-16 10:26:11 -07:00
Gregg Van Hove
4e47b78f1f Use isFunction to check for functionness in callFake
- Fixes #1191
2016-09-14 16:06:44 -07:00
Henry Blyth
8e23c26383 Make spyOnProperty available in tests
Needed adding to the env and require interface
2016-09-12 18:22:58 -05:00
Sukharev Maxim
56191cfb2e Implement spies for get/set functions on accessor properties 2016-09-12 18:22:58 -05:00
Gregg Van Hove
8624a52ee0 Don't auto install phantom since it doesn't seem to work on travis 2016-09-07 15:48:20 -07:00
Gregg Van Hove
a4b92b34f4 Update to 2.5.1 2016-09-07 14:31:18 -07:00
Gregg Van Hove
3486e8d166 Merge branch '1189' of https://github.com/seanparmelee/jasmine into seanparmelee-1189
- Merges #1193 from @seanparmlee
- Fixes #1189
2016-09-01 21:11:07 -07:00
Gregg Van Hove
8366ef9be5 Merge branch 'fix' of https://github.com/logankd/jasmine into logankd-fix
- Merges #1192 from @logankd
- Fixes #1188
2016-09-01 20:44:13 -07:00
Gregg Van Hove
ab0567c665 Generated file for date tick fix 2016-09-01 20:41:51 -07:00
Sean Parmelee
8676bbf11a fallback on assignment when a spy cannot be deleted 2016-09-01 13:39:25 -05:00
Kevin Logan
c0a9d20a02 fix for issue #1188 2016-09-01 10:59:19 -05:00
Gregg Van Hove
c7cc3b4a29 Properly tick date along with clock
- Specifically when there aren't functions scheduled at the ticks

Fixes #1190
2016-08-31 21:24:01 -07:00
Gregg Van Hove
5a2e1b0082 Update to 2.5.0 2016-08-30 21:23:08 -07:00
Gregg Van Hove
f196faf0bb Update anonymous constructor pretty print specs to work in IE 2016-08-25 15:29:32 -07:00
Gregg Van Hove
850204dfb8 Merge branch 'prettyPrintCustomConstructortoString' of https://github.com/mbildner/jasmine into mbildner-prettyPrintCustomConstructortoString
- Fixes #1019
- Merges #1099
2016-08-15 15:50:59 -07:00
Gregg Van Hove
7bda3bd728 Build distribution 2016-08-15 09:41:48 -07:00
Gregg Van Hove
b9c25e88b9 Merge branch 'callfake-better-error' of https://github.com/kapke/jasmine into kapke-callfake-better-error
- Merges #1059
- Fixes #1016
2016-08-15 09:34:03 -07:00
Gregg Van Hove
13228c304e Add gulp-jasmine-browser link to readme
Close #1089
2016-08-15 09:30:38 -07:00
Greg Cobb
da18479422 Merge pull request #1170 from benchristel/how-to-test-in-ie
Add instructions for testing in IE
2016-07-25 21:59:23 -07:00
Greg Cobb
ba211e4913 Update codeclimate.yml
[#1171]
2016-07-25 21:36:57 -07:00
Greg Cobb
5f9a965d7c Exclude lib directory from codeclimate
- Generated files show up as duplicates of src

[#1171]
2016-07-25 21:11:44 -07:00
Ben Christel
3ff59835ea Add instructions for testing in IE 2016-07-25 10:20:43 -07:00
Greg Cobb
9fedf74f32 Build distribution 2016-07-24 22:38:36 -07:00
Greg Cobb
0339fc500a Merge pull request #1169 from benchristel/fix-build
Fix the build in ie8
2016-07-24 22:20:55 -07:00
Ben Christel
227b0c62a3 Make the build pass in ie8
- pending() throws an exception in ie8. I have not dug into the root cause.
- iframe.contentWindow.eval() isn't supported in ie8
2016-07-24 21:48:11 -07:00
Greg Cobb
3de60067f0 Merge pull request #1158 from benchristel/move-functions-to-higher-scope
Restructure eq code and tests
2016-07-21 21:28:45 -07:00
Ben Christel
cb1001e6c2 De-dup test setup
- Move environment-specific tests for toEquals into describe blocks so the check for the environment can be shared
2016-07-21 12:26:43 -07:00
Ben Christel
d9ded15c45 Move functions in to a higher scope
- Prevents them from accessing eq's local vars, which could cause bugs.
2016-07-21 12:10:37 -07:00
Ben Christel
a0bce8031e Test comparison of objects from different frames 2016-07-21 12:10:37 -07:00
Greg Cobb
7f7dda7a2c Merge pull request #1162 from amavisca/update-dev-dependencies
Update devDependencies and fix issues from this
2016-07-20 20:18:57 -07:00
Chris Amavisca
15f92b226c Update devDependencies and fix issues from this
- Point to npm released version of jasmine node runner
2016-07-20 20:11:52 -07:00
Greg Cobb
99aa2247b6 Build distribution 2016-07-19 23:00:25 -07:00
Greg Cobb
314eb63552 Merge pull request #1129 from gregeinfrank/remove-runnable-lookup-table
Remove runnableLookupTable which is no longer used
2016-07-18 23:39:15 -07:00
Greg Cobb
bd6ca98f9d Revert "Merge pull request #1151 from amavisca/update-dev-dependencies"
This reverts commit eee75d8eed, reversing
changes made to 5e0ebadb3d.
2016-07-18 23:28:50 -07:00
Greg Cobb
eee75d8eed Merge pull request #1151 from amavisca/update-dev-dependencies
Upgrade devDependencies glob and shelljs
2016-07-18 23:00:34 -07:00
Greg Cobb
5e0ebadb3d Merge pull request #1155 from benchristel/arrays-properties-bug
Make `toEqual` pass for arrays with equivalent properties
2016-07-18 22:56:20 -07:00
Ben Christel
738c10fd43 Make toEqual pass for arrays with equivalent properties
- Fixes a bug caused by accidental use of a closure variable
2016-07-18 16:48:00 -07:00
Greg Cobb
8c9ffe3144 Merge pull request #1152 from amavisca/update-travis-ruby
Update ruby version on travis to let rack install
2016-07-14 22:28:50 -07:00
Chris Amavisca
ab2c916c3a Update ruby version on travis to let rack install 2016-07-14 19:57:08 -07:00
Chris Amavisca
290fb3fdcd Upgrade devDependencies glob and shelljs 2016-07-14 19:46:32 -07:00
Joey Parrish
de7b7c029e Pass custom testers to asymmetric testers
This allows custom equality testers to affect asymmetric matches.
This avoid suprises when combining addCustomEqualityTester with
objectContaining or arrayContaining.

Closes #1138
2016-06-23 14:33:39 -07:00
Greg Einfrank
e13c7a55a9 Remove runnableLookupTable which is no longer used 2016-06-08 10:59:42 -07:00
Pivotal
7a62969a14 createSpyObj may use object for method->response shorthand
examples:

```JavaScript
var mySpy = jasmine.createSpyObj("mySpy", { getAge: 55, getLanguage: "JavaScrizzle" });

var age = mySpy.getAge();

expect(age).toEqual(55);
expect(mySpy.getAge).toHaveBeenCalled();
```

Also does:

Add "isObject_" method to utils to make it easier for "createSpy" to support an array or object of stubs
2016-04-25 17:10:22 -04:00
Pivotal
604cd6132f Prettyprint objects whose constructors have custom toString method
- when the constructor has a name, print the name
- when the constructor does not have a name, print `<anonymous>`

[Fixes issue 1019](https://github.com/jasmine/jasmine/issues/1019)
2016-04-25 14:23:48 -04:00
Fulvio Valente
2710bdfc5e Correctly pretty print objects from other contexts (e.g. iframes) and which do not override toString
Fixes #1087
2016-04-11 18:51:04 +01:00
Gregg Van Hove
f6da084642 Merge branch 'patch-1' of https://github.com/skupr/jasmine into skupr-patch-1
- Merges #1079 from @skupr
- Fixes #964
2016-03-26 21:28:46 -07:00
Gregg Van Hove
6c0224414c Generate combined file for previous features 2016-03-26 21:27:04 -07:00
Stanislav Kupryakhin
c302545ba4 Fix jasmine setup in Electron environment
Fix for issue  #964
2016-03-21 08:38:27 +06:00
slackersoft
954a6a0091 Merge branch 'feat/improveErrorMessages' of https://github.com/dhoko/jasmine into dhoko-feat/improveErrorMessages
- Merges #1026 from @dhoko
- Fixes #1025
2016-03-18 10:59:31 -07:00
slackersoft
11cfaae42a Merge branch 'marneborn-bluebird3.0-warnings'
- Merges #1062 from @marneborn
- Fixes #992
2016-03-11 09:13:43 -08:00
Erik Welander
927cc011d6 Added support for ES6 sets to toContain and toEqual. 2016-03-04 02:09:59 -08:00
Mikael Arneborn
6cf2d94f73 The done function now returns null 2016-03-03 08:55:01 -08:00
Mikael Arneborn
b578e72c8f Added failing test for done returning null 2016-03-03 08:54:46 -08:00
Gregg Van Hove
1da6c7cf85 Merge branch 'add-editorconfig' of https://github.com/kapke/jasmine into kapke-add-editorconfig
- Merges #1058
- Fixes #1057
2016-03-01 17:50:59 -08:00
Gregg Van Hove
87e808282b Always quote the browser version so nothing converts it to a float 2016-03-01 17:34:24 -08:00
dhoko
14067d0785 Improve errors with the domaine and how to use the API 2016-02-29 10:33:45 +01:00
Dominick Reinhold
d1a94bcf50 When the HtmlReporter has a 'spec' query param, the spec list only shows matching specs/suites 2016-02-28 22:47:10 -08:00
Andrzej Kopeć
bbf3f6825c Improve error message when passing a non-function to callFake 2016-02-28 21:37:28 +01:00
Andrzej Kopeć
9b653b9dcb Add .editorconfig file 2016-02-28 18:33:39 +01:00
Gregg Van Hove
b6798cdb06 Html Reporter shows error bar for errors from a global afterAll
Issue #811
2016-02-25 16:12:15 -08:00
Gregg Van Hove
dbd198f7d0 Allow expectations in a global beforeAll or afterAll
- Report afterAll failures in jasmineDone
- Issue #811
2016-02-25 15:01:47 -08:00
Gregg Van Hove
5583b6f954 Top-level specs should compute fullName the same as Suites
- No longer include "Jasmine__TopLevel__Suite"
2016-02-25 14:29:35 -08:00
Gregg Van Hove
db8e636021 Add combined file for inherited spies 2016-02-25 14:25:40 -08:00
Andrzej Kopeć
90dea9ab38 Now spies preserve original function arity 2016-02-25 21:43:18 +01:00
Gregg Van Hove
ebbefafc26 Turn the describe error spec back on and update for new code 2016-02-25 10:04:31 -08:00
Gregg Van Hove
b66ffc1277 Merge branch 'spy-inherited-methods' of https://github.com/benchristel/jasmine into benchristel-spy-inherited-methods
- Merges #1036
- Fixes #737
2016-02-22 14:11:00 -08:00
Gregg Van Hove
5458f2f18d Array equality treats undefined elements as equal however they got in there
- Fixes #786
2016-02-22 11:06:59 -08:00
Gregg Van Hove
602f5bc08a Merge branch 'fallback-report' of https://github.com/mauricioborges/jasmine into mauricioborges-fallback-report
- Merges #1009
2016-02-22 10:20:48 -08:00
Gregg Van Hove
4e4cd30965 Merge pull request #1047 from d-reinhold/bundle-exec-compass
Grunt task for compass should prefix command with 'bundle exec'

- Merges #1047
2016-02-18 17:48:10 -08:00
Gregg Van Hove
7224c6adf2 Merge branch 'fix-eq-for-edge' of https://github.com/everedifice/jasmine into everedifice-fix-eq-for-edge
- Merges #1041
2016-02-18 16:48:33 -08:00
Gregg Van Hove
5bdd7e8fbf Merge branch 'issue-931-respy' of https://github.com/guy-mograbi-at-gigaspaces/jasmine into guy-mograbi-at-gigaspaces-issue-931-respy
- Merges #953
- Fixes #931
2016-02-18 11:40:01 -08:00
Gregg Van Hove
1e0381a495 Update describe error message to no longer assume errant args are done
Fixes #896
2016-02-18 09:31:31 -08:00
Gregg Van Hove
c454658c54 Merge branch 'rullopat-greater-than-or-equal-less-than-or-equal-matchers'
- Merges #1049
- Fixes #1013
2016-02-17 15:46:05 -08:00
Patrizio Rullo
b7d8b0de71 Add toBeGreatThanOrEqual and toBeLessThanOrEqual matchers
- Implements issue #1013
2016-02-18 00:13:26 +01:00
Gregg Van Hove
342f0eb9a3 Merge branch 'logankd-master'
- Support call count of 0 with toHaveBeenCalledTimes matcher

- Merges #1048
- Fixes #994
2016-02-17 10:33:27 -08:00
Kevin Logan
44b56093e7 #1048 - fixed toThrow expectation 2016-02-17 12:16:54 -06:00
Kevin Logan
bee8132848 #1015 - revert formatting and spacing 2016-02-17 12:09:26 -06:00
Kevin Logan
e5c744f3dc #1015 use isNumber fuction to check for empty expected argument. This will allow 0 to be passed in. 2016-02-17 12:03:06 -06:00
Gregg Van Hove
4fb5aa14b8 Merge branch 'issue1010' of https://github.com/bodawei/jasmine into bodawei-issue1010
- Merges #1011
- Fixes #1010
2016-02-16 15:41:42 -08:00
Gregg Van Hove
43cd73938d Merge branch 'remove-extra-topSuite-constructor-param' of https://github.com/jurko-gospodnetic/jasmine into jurko-gospodnetic-remove-extra-topSuite-constructor-param
- Merges #1006
2016-02-16 15:23:05 -08:00
Gregg Van Hove
f38e8e9235 Merge branch 'cloned-args-on-calltracker' of https://github.com/a-r-d/jasmine into a-r-d-cloned-args-on-calltracker
- Merges #1000
- Fixes #872
2016-02-16 15:00:49 -08:00
Gregg Van Hove
fcd5a1948b Merge branch 'skipped-links-with-random' of https://github.com/basawyer/jasmine into basawyer-skipped-links-with-random 2016-02-16 09:43:33 -08:00
Mauricio Borges Silva
6489b0f400 Add support on Env to provide fallback report 2016-02-15 23:12:05 -02:00
Mauricio Borges Silva
5e3582d8e7 Add support to fallback report providing on ReportDispatcher 2016-02-15 23:12:05 -02:00
Dominick Reinhold
33151ed9eb Grunt task for compass should prefix command with 'bundle exec'
- Since we're stating that compass is a development dependency in our
  gemspec, and we use bundle to install it, we should make sure that
  grunt is using the correct (bundled) version of compass.

- This is especially important since many of the older versions of compass
  are buggy (see https://github.com/gruntjs/grunt-contrib-compass/issues/204)
2016-02-15 11:39:21 -08:00
minhyeong-kim
3f27ff1c7c chore: fix jshint error 2016-02-04 17:47:17 +09:00
minhyeong-kim
b59cacf131 refactor: fix Edge freezing issue for matcherUtils#eq
fix Microsoft Edge freezing when recursive comparing
2016-02-04 17:09:03 +09:00
Ben Christel
d6f1f8dec5 Correctly teardown spies on inherited methods
- If the spied method is not an own property of the object being spied
  upon, the method is deleted from the object on teardown instead of
  being set to the original implementation.

- #737
2016-02-01 17:45:47 -08:00
Gregg Van Hove
e0541eca80 Merge pull request #1021 from pra85/2016
Update license year range to 2016
2016-01-17 15:24:53 -08:00
Prayag Verma
8b7cb21874 Update license year range to 2016 2016-01-18 01:13:22 +05:30
Blake Sawyer
ee0ff3b6c8 Persist randomize param in 'run all' links 2016-01-14 20:58:15 -05:00
DJ Burrowes
65241565c5 Reverse order that spies are cleared up.
Fixes #1010
2016-01-03 19:14:57 -08:00
Jurko Gospodnetić
a047115eef remove extra topSuite queueRunner construction parameter
The `Suite` constructor function does not expect or use the its only `attrs`
parameter's `queueRunner` attribute, so setting it serves no purpose and
only clutters the code and makes it more difficult to understand.
2015-12-26 21:49:45 +01:00
Gregg Van Hove
0d4c8d13bb build distribution file for mockDate changes 2015-12-22 15:25:38 -08:00
Gregg Van Hove
17c5e2b10d Merge branch 'fix-clock-date' of https://github.com/andrewiggins/jasmine into andrewiggins-fix-clock-date
Fixes #915
Merges #980
2015-12-22 15:18:58 -08:00
Aaron DEcker
fa71928cad changed arg cloner to be safe on older browsers 2015-12-22 00:35:36 -05:00
Aaron DEcker
3e91ac0889 add option to shallow clone args in call tracker 2015-12-22 00:27:51 -05:00
Gregg Van Hove
79206ccff5 Rename j$ to jasmineUnderTest for specs
- Clarifies what it is for when writing tests
- No longer named the same as the `jasmine` that is injected into live
  code
2015-12-03 17:23:32 -08:00
Gregg Van Hove
a95c2cfe3f Bump version to 2.4.1 2015-12-03 16:06:51 -08:00
Gregg Van Hove
e2e2d1b343 Revert #908
- Run `afterEach` in reverse order declared as before
2015-12-03 16:02:32 -08:00
Gregg Van Hove
3b53e469fd Bump version to 2.4.0 2015-12-02 22:02:03 -08:00
Andre Wiggins
c8b212f278 make DelayedFunctionScheduler update the mockDate 2015-11-20 03:45:57 -08:00
Gregg Van Hove
b3f69852c1 Merge pull request #973 from brunoqc/patch-1
Syntax highlighting in README.md
2015-11-13 17:05:28 -08:00
Bruno Bigras
1613a376b1 Syntax highlighting in README.md 2015-11-12 12:10:21 -05:00
Gregg Van Hove
1e35e8ba95 Use git:// url for jasmine-npm dependency 2015-11-04 15:12:38 -08:00
Gregg Van Hove
a6b209bc2f Use jasmine-npm straight from github when developing 2015-11-04 15:05:07 -08:00
Gregg Van Hove
2301914549 build combined file for jsApiReporter changes
[#92249258]
2015-11-04 14:11:39 -08:00
Gregg Van Hove
320c42b6cc Run jasmine's specs randomly in node and performance specs
[#92249258]
2015-11-04 12:30:49 -08:00
Gregg Van Hove
df45b4fede Run jasmine's specs in random order
[#92249258]
2015-11-04 12:06:28 -08:00
Gregg Van Hove
c1ab3c9cbe Add support for returning run details for reporting randomness
[#92249258]
2015-11-04 12:05:29 -08:00
Gregg Van Hove
d2f2e2b870 Merge branch 'himajasuman-issue#896'
Fixes #896
2015-10-27 14:13:15 -07:00
Gregg Van Hove
0f6a7f04b3 Merge branch 'issue#896' of https://github.com/himajasuman/jasmine into himajasuman-issue#896 2015-10-27 14:12:31 -07:00
Gregg Van Hove
728af5e556 Remove unused queueableFn arg from onException
Fixes #958
2015-10-27 12:24:32 -07:00
Gregg Van Hove
018fd53c10 Merge branch 'FuzzySockets-to-throw-error-unused-param' 2015-10-27 12:22:09 -07:00
Gregg Van Hove
25d73515f3 Merge branch 'to-throw-error-unused-param' of https://github.com/FuzzySockets/jasmine into FuzzySockets-to-throw-error-unused-param 2015-10-27 12:21:42 -07:00
Gregg Van Hove
8e317d4026 Less verbose for the linter 2015-10-26 17:51:42 -07:00
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
77514bbb80 use safari 9 not 8.1 anymore 2015-10-26 17:18:25 -07:00
Gregg Van Hove
a85c3a4da8 Check for descriptor 2015-10-26 17:03:45 -07:00
Gregg Van Hove
0b1e1a0401 Merge branch 'StephanBijzitter-throw-for-constants'
Fixes #948
2015-10-26 16:30:01 -07:00
Gregg Van Hove
3374415add Merge pull request #954 from matthewhuff89/remove_goals_md
Removed GOALS_2.0.md, doesn't seem to be needed anymore
2015-10-26 14:58:03 -07:00
Richard Harrington
c2ae3b6b12 Remove unused parameter from toThrowError 2015-10-26 11:43:31 -04:00
Himaja
110cacab19 Added a throw error block in describe incase a function with arguments is passed in describe 2015-10-25 14:13:14 -04:00
Matthew D. Huff
db7879a478 Removed GOALS_2.0.md, doesn't seem to be needed anymore 2015-10-25 13:03:46 -04:00
guy-mograbi-at-gigaspaces
e7dbc75fc2 feat(spy): add option to respy
will not throw error if spyOn called on a spy

fixes #931
2015-10-24 08:37:33 +03:00
Stephan Bijzitter
a81466d9e7 Abort spying when the target cannot be spied on 2015-10-21 12:44:52 +02:00
Gregg Van Hove
48f42eaa7d Merge branch 'lalunamel-master'
Merges #942
Fixes #930
Fixes #912
2015-10-15 09:21:57 -07: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
141fd910f2 Use className instead of class when creating DOM elements 2015-10-06 09:10:22 -07:00
Gregg Van Hove
a93bfd2120 Merge branch 'marcioj-random-tests' 2015-10-04 14:03:30 -07: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
Gregg Van Hove
6ee7fd6ced Merge branch 'toString_fallback' of https://github.com/myitcv/jasmine into myitcv-toString_fallback 2015-10-04 13:47:27 -07:00
Gregg Van Hove
878325e2cf Merge branch 'James-Dunn-patch-1' 2015-10-04 13:45:10 -07:00
James
80c4f87dd5 Fix circles/x from getting cut off on Mac/chrome 2015-09-27 17:01:08 +04: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
375a6f9fda Merge branch 'danielalexiuc-master'
- Fixes #924
- Fixes #917
2015-09-24 12:58:56 -07:00
danielalexiuc
c017f0000d Postpone find() until it is needed
This is a fix for issue #917.

It seems that 'symbols' was originally included as a performance optimization, to avoid repeated find() calls for '.jasmine-symbol-summary'. However this find() occasionally fails during initialize if the dom has not loaded completely.

This change will not affect performance, as symbols is still cached. However it improves upon the original code in that the find happens at a stage much later than initialize.
2015-09-16 11:52:05 +10: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
Gregg Van Hove
825dab32ff Merge pull request #908 from mcamac/master
Reverse suite afterEach behavior to match semantics?
2015-09-01 21:33:52 -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
Gregg Van Hove
6028a5d92c Merge branch 'SimenB-badges' 2015-08-10 10:39:39 -07:00
Simen Bekkhus
93a13ab791 Use badges from shields.io 2015-08-08 07:54:15 +02:00
Greg Chattin-McNichols and Gregg Van Hove
542f483228 Force the safari 8.1 version to be a string for sauce 2015-08-04 15:11:39 -07:00
Greg Chattin-McNichols and Gregg Van Hove
459b4c29b6 Drop Safari 5 on OS-X from the build matrix
- SauceLabs no longer supports it
- Add Safari 8.1
2015-08-04 09:40:37 -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
Greg Chattin-McNichols and Gregg Van Hove
cd55f03912 concat files for toHaveBeenCalledTimes matcher 2015-08-03 14:57:52 -07:00
Gregg Van Hove
79954311fb Merge pull request #892 from obastemur/patch-1
Update glob to latest
2015-07-16 12:10:21 -07:00
Oguz Bastemur
3f71bcdb2d Update glob to latest
Fixes https://github.com/jasmine/jasmine/issues/891
2015-07-15 02:37:36 +03:00
Gregg Van Hove
06f05ac57b Add notes about "ready for work" label 2015-07-02 14:52:17 -07:00
Gregg Van Hove
5ea5ec6004 Merge branch 'kkirsche-patch-1' 2015-06-12 13:25:37 -07:00
Kevin Kirsche
f7033f6551 Remove moot version property from bower.json
Per bower/bower.json-spec@a325da3
2015-06-10 18:36:17 -04:00
Gregg Van Hove
7e6e905814 Merge branch 'logankd-toHaveBeenCalledTimes'
Fixes #871
2015-06-05 21:09:51 -07:00
Kevin
a6a1962924 add toHaveBeenCalledTimes matcher
Fix #853
2015-06-05 21:07:24 -07:00
Gregg Van Hove
50944fea6f Mention use of bundle exec for running the jasmine server during dev 2015-06-05 20:36:56 -07:00
Liam Wall
7bfc4c0a45 xdescribe marks pending, plus associated tests. 2015-05-29 17:21:28 +01:00
Gregg Van Hove and Noah Denton
4be2079482 Use the travis sauce connect addon 2015-05-18 17:04:21 -07:00
Gregg Van Hove
d6f47ea886 Merge pull request #856 from lpww/patch-1
Update CONTRIBUTING.md
2015-05-18 14:29:44 -07:00
Gregg Van Hove
5061dd066c Merge branch 'unique-css-classes' of https://github.com/prather-mcs/jasmine into prather-mcs-unique-css-classes 2015-05-18 14:29:03 -07:00
Gregg Van Hove
2a847a67e3 Merge branch 'danfinnie-any-vs-anything-error' 2015-05-18 14:27:27 -07:00
Thomas Treffry
50223d97d6 Update CONTRIBUTING.md
Rephrase confusing statement:

From:
If when you run ($ grunt)...you see that JSHint runs your system is ready.

To:
Now run ($ grunt)...if you see that JSHint runs, your system is ready.
2015-05-17 11:49:39 -07:00
Dan Finnie
302e78f1df Raise an error when jasmine.any() isn't passed a constructor 2015-05-17 02:21:26 -04:00
Matt Prather
42ad12ec52 Make the HtmlReport CSS classes "unique enough"
The only difference between this commit and the previous is that I have
used a difference scheme for naming Jasmine CSS classes.

Instead of appending "_jasmine-css" to all Jasmine CSS selectors, I have
now preprended "jasmine-" instead.
2015-05-14 14:23:06 -07:00
Matt Prather
c41fa7d156 Make the HtmlReport CSS classes "unique enough"
As described in Issue Report 844...
https://github.com/jasmine/jasmine/issues/844

...style rules in the app-being-tested may incidentally affect elements
in the Jasmine HTML Report container, as long as there is a chance that
the app-being-tested has CSS style rules for classes (or IDs) that
Jasmine uses.

This fix attempts to bring Jasmine to a state where each and every class
it uses always ends with "_jasmine-css" which should be unique enough to
ensure that CSS in the app-being-tested won't affect the Jasmine report,
because no app-being-tested is ever likely to use classes that end with
"_jasmine-css"

I'll be surpised if this commit is good enough as it is now, on the
first attempt to fix #844, because of reasons I'll explain in either
the Issue or the Pull Request.
2015-05-13 18:55:44 -07:00
Gregg Van Hove
0b1449228f Bump version to 2.3.4 2015-05-13 14:57:56 -07: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
Gregg Van Hove
7cbd86357d Merge branch 'remove-dead-css' of https://github.com/prather-mcs/jasmine into prather-mcs-remove-dead-css 2015-05-13 11:03:25 -07:00
Gregg Van Hove
4f278be2c2 Update standalone installation instructions to reference the releases page
Fix #603
2015-05-13 10:59:39 -07:00
Matt Prather
f2bc9b5bd8 Remove the style rule for .running-alert CSS class
https://github.com/jasmine/jasmine/issues/847#issuecomment-101446573
2015-05-12 15:51:42 -07:00
Gregg Van Hove
e9d79bc946 Merge branch 'prather-mcs-remove-dead-css' 2015-05-11 10:59:36 -07:00
Gregg Van Hove
0b2097b616 Bump version to 2.3.3 2015-05-11 10:48:58 -07:00
Gregg Van Hove
f02824ae52 Merge branch 'remove-dead-css' of https://github.com/prather-mcs/jasmine into prather-mcs-remove-dead-css 2015-05-11 10:41:18 -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
Matt Prather
e855c898d1 Remove dead CSS class styles
I removed the `.showDetails` and `.summaryMenuItem` styles from the Sass
file because I believe that no HTML elements with those classes will
ever be generated by Jasmine and that they are dead code that someone
forgot to remove.

This is my first contribution to the Jasmine project and so I might be
doing something wrong, but I believe just this one change will propagate
to all the generated code when it is built, and that I should not be
altering any other code in any other place to accomplish the change I
intend.

This is related to Jasmine Issue 847:
https://github.com/jasmine/jasmine/issues/847
2015-05-10 16:58:07 -07:00
Gregg Van Hove
426eebe1ce bump version to 2.3.2 2015-05-07 14:02:12 -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
023c998660 use a link for the PR in release notes 2015-05-05 07:51:49 -07:00
Gregg Van Hove
3dde7d0c29 Bump version to 2.3.1 to create a new bower package 2015-05-05 07:48:49 -07:00
Gregg Van Hove
4e3f9a4d09 Merge pull request #843 from evoL/fix-bower-package
Make the Bower package use browser-friendly files.
2015-05-05 07:22:25 -07:00
Rafał Hirsz
b89fbc71a7 Point Bower's main field to jasmine.js, which is browser-friendly. 2015-05-05 15:36:24 +02:00
Gregg Van Hove
4c0e3b2aed remove dist zips from the repo. They should all be available on github releases 2015-04-28 13:43:21 -07:00
Gregg Van Hove
19f812c4f6 Fix cp command for release documentation 2015-04-28 11:27:03 -07:00
Gregg Van Hove
5ea24a8448 version bump to 2.3.0 2015-04-28 10:13:42 -07:00
Gregg Van Hove
4173a4089c Merge pull request #827 from davetron5000/patch-1
Explicitly state the main JS
2015-04-19 10:03:19 -07:00
David Copeland
f712b795d7 Explicitly state the main JS
# Problem

To bring this lib in using Sprockets, you must do this:

```javascript
//= require jasmine/lib/jasmine-core
```

Sprockets can read `bower.json` and, if `main` is explicitly stated in the file, you can do the much more future-proof and compact:


```javascript
//= require jasmine
```

# Solution

Explicitly specify it.

# Caveats

I am not super-versed in Bower or JS packaging, so this is proposed in the vein of "this fixes my problem and seems consistent with other JS libs I've looked at", but I'm open to other solutions.
2015-04-19 12:22:33 -04: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
7cd8c41d31 Merge pull request #818 from lpww/patch-1
Update formatting
2015-04-05 21:56:59 -07:00
Thomas Treffry
d7dd85c64f Update formatting
Remove periods from bullet points for consistency with rest of document
2015-04-05 20:19:29 -07:00
Davis W. Frank
2d5c071d28 Merge pull request #815 from jhamon/contributing-subjective-readability-improvements
Subjective readability improvements to CONTRIBUTING.md
2015-04-02 08:49:39 -07:00
Jen Hamon
76bc0a87db Use code fence syntax around git workflow for readability. 2015-04-01 13:25:32 -07:00
Jen Hamon
5cae401c98 Pull urls out of paragraph to improve readability 2015-04-01 13:06:58 -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
692c8716f0 Style disabled specs in the results list 2015-03-26 15:45:26 -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
Gregg Van Hove
46044dd345 Merge branch 'sgravrock-clock-reset' 2015-03-15 13:23:56 -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
Gregg Van Hove
abc0c4a97e Update to ruby 2.x for travis builds
- sauce gem allowed cmdparse to upgrade a major version and 3.0 of
  cmdparse requires ruby >= 2.0.0
2015-03-14 15:26:46 -07:00
slackersoft
eb1d98338a Properly inject j$ into Suite 2015-03-06 11:43:57 -08:00
slackersoft
f0c480f456 Use onclick directly to better support older webkit 2015-03-06 10:09:08 -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
1a08d1e8c6 Don't use deprecated onComplete syntax for jasmine-npm 2015-03-04 17:44:05 -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 and Molly Trombley-McCann
c58d83bbe3 Merge branch 'remove-unnecessary-conditional' of https://github.com/toddbranch/jasmine into toddbranch-remove-unnecessary-conditional 2015-03-04 12:00:07 -08:00
Gregg Van Hove and Molly Trombley-McCann
1c6f4ef0e6 Build distribution for previous changes 2015-03-04 11:58:47 -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
Gregg Van Hove
22f58c0049 Merge pull request #789 from sgravrock/safe-temp-dir
Don't use hardcoded temporary directory paths
2015-03-02 13:59:26 -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
slackersoft
0c68cc4afc Fix spec so it can be run in isolation
relates to #790
2015-02-27 16:57:23 -08:00
slackersoft
ce6ce4e2c7 Add safari 7 & 8 to browser matrix 2015-02-27 13:44:55 -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
Steve Gravrock
0776146d3b Don't use hardcoded temporary directory paths 2015-02-22 16:03:20 -08:00
Todd Branchflower
bbac4bb23f remove unnecessary conditional 2015-02-20 14:04:08 -07:00
Gregg Van Hove
8c59875afe Merge pull request #775 from joscha/patch-1
add missing semicolon
2015-02-09 09:54:54 -08:00
Joscha Feth
cdee9c8853 add missing semicolon 2015-02-09 15:40:41 +01:00
Greg Cobb and Gregg Van Hove
69956bf8f6 ObjectContaining matches prototype properties
[#769]
2015-02-05 14:15:57 -08:00
Christopher Amavisca
e1249ac89a Remove unused standaloneBuilder var from Gruntfile 2015-02-04 17:06:56 -08:00
Christopher Amavisca
a84e0cd8ef Add test script to package.json
- Use `npm test` in travis-node-script
2015-02-04 16:55:07 -08:00
Christopher Amavisca
6177a4aeff Update bower.json keywords to match package.json keywords 2015-02-04 16:36:43 -08:00
Christopher Amavisca
471a241493 Add keywords to package.json 2015-02-04 16:36:31 -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
Gregg Van Hove
2ab2a83a3b Merge pull request #768 from danilovaz/master
Update year copyright
2015-02-04 09:58:40 -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
Danilo Vaz
7616e5a3fd Update year copyright 2015-02-04 08:42:18 -02:00
Greg Cobb and Gregg Van Hove
e173cd1c9d bump version to 2.2.1 for bower fix 2015-02-02 12:24:14 -08:00
Gregg Van Hove
234dc1a047 Merge pull request #763 from gabrielhpugliese/gabrielhpugliese-patch-bower-json
Fix missing comma on bower.json
2015-02-02 12:16:47 -08:00
Gabriel H Pugliese
d22a030b87 Fix missing comma on bower.json 2015-02-02 18:03:32 -02:00
Greg Cobb and Gregg Van Hove
4acb7448d8 Update release notes and bump version for 2.2.0 2015-02-02 11:27:14 -08:00
slackersoft
a26e85ff3a update 2.2.0 release notes now that I've pulled 2015-01-30 13:03:08 -08:00
slackersoft
39e175c05f Initial cut of release notes for 2.2.0 2015-01-30 13:02:01 -08:00
Christopher Amavisca
d129a6c0ee Restructure node examples folder structure to look more realistic.
- Updates PlayerSpec's require statement to match folder structure change
2015-01-27 14:39:59 -08:00
slackersoft
837101c025 Add a basic bower config
- Also ignore sauce_connect.log

Fix #719
2015-01-26 17:53:41 -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
a857f4c042 Merge branch 'ptomato-gjs-global-object' 2015-01-26 12:22:05 -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
5dbcf27f72 Merge branch 'ptomato-spidermonkey-compat' 2015-01-26 11:47:35 -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
slackersoft
46509f05a9 Add jshint to node run on travis
- To ensure that pull requests pass

[Finish #59588854]
2015-01-26 10:59:44 -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
slackersoft
6ae054c3e2 Update contribution guide to mention possible ffi dependencies for Ubuntu
Fixes #755
2015-01-21 12:55:07 -08:00
Gregg Van Hove
e5feba994f Merge pull request #746 from swirlycheetah/patch-1
Fix spelling mistake
2015-01-14 17:00:19 -08:00
Chris Wheatley
20faa883fb fix spelling mistake 2015-01-14 22:15:49 +00:00
Gregg Van Hove
3bba1eabd4 Merge pull request #745 from rohit/fix-repo-url
Use new jasmine github repo url
2015-01-14 10:26:39 -08:00
Rohit Arondekar
9ad3eac469 Use new jasmine github repo url 2015-01-14 20:47:09 +05:30
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
c1479acd17 Fix fail specs for all browsers #734 2015-01-12 13:37:10 -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
Gregg Van Hove
6c58024321 Update readme with link to upgrading doc and mention browser support.
Fix #739
2015-01-12 11:06:59 -08:00
Gregg Van Hove
aeae141fd4 Merge branch 'moonmaster9000-patch-2' 2015-01-12 10:08:15 -08:00
Matt Parker
a951bbbb47 Link to the Jasmine NPM module
Also, put the jasmine-<language> links above the confusing "install jasmine on your local box" stuff (why would I want to do that?)
2015-01-12 10:08:04 -08:00
slackersoft
895c17e5c1 Merge branch 'rohit-equals-null-protoObjects' 2014-12-20 16:48:26 -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
9f240c5b9e Build distribution to properly expose stringMatching
[#58120558]
2014-12-19 12:45:58 -08:00
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
Gregg Van Hove
2472982fe9 Merge pull request #730 from rohit/patch-1
Fix URL's of Jasmine repositories on Github
2014-12-19 09:21:02 -08:00
Rohit Arondekar
c85500a924 Fix URL's of Jasmine repositories on Github 2014-12-19 07:36:03 +05:30
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
6c131beda7 Don't double escape focus spec links.
- QueryString already escapes parameter values, no need to escape when
  passing them in from HtmlReporter.

[finish #29578495]
2014-12-16 17:21:22 -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
eca8d8f009 Also test in IE 11 on travis 2014-12-16 11:57:48 -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
503f4b7f49 Keep extra query params when focusing on a spec or suite
[finish #29578495]
2014-12-15 18:30:32 -08:00
slackersoft
fbe38018c9 Hide more things from the npm package
Fixes #726
2014-12-11 12:48:50 -08:00
slackersoft
8bb2f67fb3 Properly record finishing an xdescribe so further cleanup works
Fix #724
2014-12-09 12:40:00 -08:00
slackersoft
ba9c863de9 Add spec to verify custom query params are left alone
[#29578495]
2014-12-05 08:12:42 -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
a4faa80be4 pass through all args from external interface for befores, afters, its
Fix #483
2014-12-02 13:29:43 -08:00
slackersoft
b68ba90ad7 Just return the result directly from any and objectContaining
- They return false when they fail which means not equal.
2014-12-02 07:56:40 -08:00
slackersoft
dc7be9c55e change 2.1.3 release notes filename to match others 2014-12-01 12:49:40 -08:00
slackersoft
b56c2a69ac add standalone dist for 2.1.3 2014-12-01 12:46:52 -08:00
slackersoft
4b6789ccd9 version bump for 2.1.3 2014-12-01 12:43:52 -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
55f32e2dc6 Don't keep the expected and actual for a passed expectation
- It causes memory problems in phantom and you probably don't need it
  anyways.

Fixes #640 Fixes #690
2014-11-22 15:03:27 -08:00
Gregg Van Hove
b30a85c8f1 Merge pull request #712 from joshk/patch-1
Use the new build env on Travis
2014-11-22 14:58:34 -08:00
Josh Kalderimis
20ce62d5f5 Use the new build env on Travis
better faster stronger

more ram, cpu, faster boot times, better network

docs coming soon
2014-11-22 14:21:03 -05:00
Christopher Amavisca
c3de57aaac Update travis badge 2014-11-22 11:16:07 -08:00
slackersoft
2517ddfe17 bump verion to 2.1.2 2014-11-16 14:56:27 -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
25c546a904 add release notes and standalone dist for 2.1.1 2014-11-14 18:44:28 -08:00
slackersoft
97ab0cb403 bump version to 2.1.1 2014-11-14 18:43:00 -08:00
slackersoft
42b1bda919 Top-level suite triggers suiteStarted and suiteEnd to be consistent
Fixes #706
2014-11-14 18:37:00 -08:00
slackersoft
216b40439f Attempt to use selenium runner from source, to fix dependency loop 2014-11-14 12:41:50 -08:00
slackersoft
590a9d9d41 bump version to 2.1.0 2014-11-14 07:54:19 -08:00
Davis W. Frank
66c8624022 Updating links in release notes 2014-11-11 09:46:38 -08:00
Davis W. Frank
75e5a5c308 Fix for wayward underscore and Anchorman bug 2014-11-10 17:24:06 -08:00
Davis W. Frank
9b5c20cc19 Adding first crack at 2.1 release notes 2014-11-10 17:15:57 -08:00
slackersoft
cc720e7f56 Add release notes for previous releases, so they can be removed from the wiki
[#54582902]
2014-11-06 08:21:31 -08:00
Gregg Van Hove
1426416666 Merge pull request #700 from tkrotoff/patch-1
Simplifies SpecRunner.html
2014-11-04 13:20:55 -08:00
Tanguy Krotoff
197cb13817 Simplifies SpecRunner.html
No need to specify type="text/javascript" for script tag
No need to specify type="text/css" for link tag with rel="stylesheet"
2014-11-04 10:30:11 +01:00
slackersoft
816b7d701f Merge branch 'charleshansen-to_contain_array_like_objects' 2014-11-03 13:10:13 -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
slackersoft
d4fc787ea7 Merge branch 'charleshansen-to_contain_array_like_objects' 2014-10-30 13:08:45 -07:00
Charles Hansen
663fbd0cdb toContain works with array-like objects (Arguments, HTMLCollections, etc)
Fix #699
2014-10-30 13:08:16 -07:00
Matt Parker
cf83ae474c Added Sheel to the Maintainers Emeritus list 2014-10-25 08:07:15 -07:00
Matt Parker
325c5a2288 Name / Email / Org updates in README 2014-10-25 07:51:18 -07:00
Gregg Van Hove
3ca687a9ad Merge pull request #691 from ertrzyiks/fix-spec-title
Fixed isPendingSpecException test title
2014-10-22 09:52:10 -07:00
Mateusz Derks
3b557f85c7 Fixed isPendingSpecException test title 2014-10-17 15:36:24 +02:00
slackersoft
b67a19507f Add notes for releasing new versions of the docs 2014-10-11 22:13:26 -07:00
slackersoft
ecae3d47a7 Use the jasmine-npm tarball, since that works on travis
[#80505862]
2014-10-11 15:04:04 -07:00
slackersoft
a76d6d1cd4 Pass in the current distribution when running node specs
- npm package spec can use beforeAll/afterAll now
- also depend on github repo directly instead of the tarball

[finish #80505862]
2014-10-11 14:54:08 -07:00
slackersoft
916dc03d9c build distribution with deprecated console
[#80410002]
2014-10-11 14:28:51 -07:00
slackersoft
2151a13705 Let's just use the print function that's passed in for deprecation messaging
[#80410002]
2014-10-11 14:20:19 -07:00
slackersoft
6cc09e00d3 Oh right, IE doesn't have console by default
[#80410002]
2014-10-11 13:54:41 -07:00
slackersoft
6d6c31328b Deprecate console reporter
- jasmine-npm has its own version so it's no longer dependent on this
  one.

[finish #80410002]
2014-10-11 13:34:45 -07: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
slackersoft
9ad15eeaba Merge branch 'akoptsov-patch-1' 2014-10-08 12:52:40 -07:00
Alexander Koptsov
10ca5f0246 Fixed path to src files in node_example
There's no such folder as 'jasmine_examples'
2014-10-07 16:35:38 +04: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
0c77c6cfb5 Use the Gemfile from the docs repo 2014-10-01 13:10:11 -07:00
slackersoft
cfc64a6f5c bundle exec the docs rake tasks 2014-10-01 09:59:39 -07:00
slackersoft
6ab70923b3 Use rake tasks in the docs repo to test it 2014-10-01 08:15:35 -07:00
slackersoft
d9c0b10be4 Remove type from queueableFns since we're not using it to determine afterAll anymore. 2014-09-30 18:28:41 -07:00
slackersoft
a58fd20d82 Build distribution for suite failed status changes 2014-09-26 18:35:06 -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
15ae0379ec Add fit and fdescribe to the public interface
They got lost in the merge
2014-09-25 13:19:13 -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
slackersoft
f703539942 build distribution for toThrowError refactor 2014-09-24 18:27:40 -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
15f3d0e9d7 update doc comment for boot.js to match current documentation 2014-09-23 08:22:05 -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
59aaac026c Merge branch 'paladox2015-patch-1' 2014-09-22 13:10:12 -07:00
slackersoft
21f62c697a Merge branch 'patch-1' of https://github.com/paladox2015/jasmine into paladox2015-patch-1 2014-09-22 13:09:07 -07:00
slackersoft
dc93c33af6 Merge branch 'pimterry-trackReturnValues' 2014-09-22 13:04:18 -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
41df058171 update contributing doc to indicate use of jasmine-npm 2014-09-20 20:54:45 -07:00
slackersoft
fa837ae90a Don't depend on debugger gem, we don't really have any ruby code here. 2014-09-20 20:17:55 -07:00
slackersoft
c82c958e0d Build distribution for earlier fixes 2014-09-16 13:05:11 -07:00
slackersoft
752e831b30 Merge branch 'mkhanal-chain_spy_andReturn'
Fix #669 #660
2014-09-15 13:10:40 -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
slackersoft
e8178d061b Merge branch 'tgirardi-issue655'
Fix #655 #658
2014-09-02 13:20:18 -07:00
slackersoft
dd75394ea8 Merge branch 'issue655' of https://github.com/tgirardi/jasmine into tgirardi-issue655 2014-09-02 13:19:31 -07:00
Greg Cobb and Tim Jarratt
6b857d11ce Factor out some common logic between fdesc and desc 2014-08-29 09:25:41 -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
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 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 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 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
paladox2015
ae94dd1bfa Update json2.js 2014-06-27 10:51:02 +01:00
slackersoft
1bad048c15 Extract afterAll checking from queueRunner 2014-06-20 08:16:42 -07:00
slackersoft
f0892a55aa report when an async afterAll doesn't call in time 2014-06-06 18:41:06 -07:00
Gregg Van Hove
6066c71966 Add failing specs for expectation failures in afterAll 2014-04-18 16:37:27 -07:00
Gregg Van Hove
0d4b04d37c rename afterAllException to afterAllError
It should also handle expectation failures
2014-04-18 16:00:02 -07:00
Javen Wang
7ad261837a disabled suite should still call onStart callback 2014-04-12 00:35:47 +08: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
pimterry
b1d4ab09af Add tests for call return value tracking 2013-12-08 13:40:25 +00:00
pimterry
3b52d015ea Track return values of spy functions 2013-12-08 13:40:24 +00:00
slackersoft
b5b77b318a Argument matcher for an array containing at least the specified entries 2013-10-03 18:21:47 -07:00
421 changed files with 58359 additions and 9599 deletions

159
.circleci/config.yml Normal file
View File

@@ -0,0 +1,159 @@
# Run tests against supported Node versions, and (except for pull requests)
# against supported browsers.
version: 2.1
executors:
node24:
docker:
- image: cimg/node:24.0.0
working_directory: ~/workspace
node22:
docker:
- image: cimg/node:22.0.0
working_directory: ~/workspace
node20:
docker:
- image: cimg/node:20.0.0
working_directory: ~/workspace
node18:
docker:
- image: cimg/node:18.20.5
working_directory: ~/workspace
jobs:
build:
parameters:
executor:
type: executor
executor: << parameters.executor >>
steps:
- checkout
- run:
name: Report Node and NPM versions
command: echo "Using Node $(node --version) and NPM $(npm --version)"
- run:
name: Install dependencies
command: npm install
- run:
name: Build
command: npm run build
- persist_to_workspace:
root: .
paths:
- .
test_node: &test_node
parameters:
executor:
type: executor
executor: << parameters.executor >>
steps:
- attach_workspace:
at: .
- run:
name: Run tests
command: npm test
test_parallel: &test_parallel
parameters:
executor:
type: executor
executor: << parameters.executor >>
steps:
- attach_workspace:
at: .
- run:
name: Run tests in parallel
command: npm run test:parallel
test_browsers: &test_browsers
executor: node18
steps:
- attach_workspace:
at: .
- run:
name: Install Sauce Connect
command: |
tmpdir=$(mktemp -d)
cd "$tmpdir"
curl https://saucelabs.com/downloads/sauce-connect/5.2.2/sauce-connect-5.2.2_linux.x86_64.tar.gz | tar zxf -
chmod +x sc
mkdir ~/workspace/bin
cp sc ~/workspace/bin
echo "Sauce Connect version info:"
~/workspace/bin/sc version
- run:
name: Run tests
command: |
# Do everything in one step because Sauce Connect won't exit
# cleanly if we kill it from a different step than it started in.
export PATH=$PATH:$HOME/workspace/bin
export SAUCE_TUNNEL_NAME=$CIRCLE_WORKFLOW_JOB_ID
scripts/start-sauce-connect
set +o errexit
scripts/run-all-browsers
exitcode=$?
set -o errexit
scripts/stop-sauce-connect
exit $exitcode
workflows:
version: 2
push:
jobs:
- build:
executor: node24
name: build_node_24
- build:
executor: node22
name: build_node_22
- build:
executor: node20
name: build_node_20
- build:
executor: node18
name: build_node_18
- test_node:
executor: node22
name: test_node_22
requires:
- build_node_22
- test_node:
executor: node20
name: test_node_20
requires:
- build_node_20
- test_node:
executor: node18
name: test_node_18
requires:
- build_node_18
- test_parallel:
executor: node24
name: test_parallel_node_24
requires:
- build_node_24
- test_parallel:
executor: node22
name: test_parallel_node_22
requires:
- build_node_22
- test_parallel:
executor: node20
name: test_parallel_node_20
requires:
- build_node_20
- test_parallel:
executor: node18
name: test_parallel_node_18
requires:
- build_node_18
- test_browsers:
requires:
- build_node_18
filters:
branches:
ignore: /pull\/.*/ # Don't run on pull requests.

8
.editorconfig Normal file
View File

@@ -0,0 +1,8 @@
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
[*.{js,mjs,json,sh,yml}]
indent_style = space
indent_size = 2

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
* text=auto eol=lf
*.png -text

112
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,112 @@
# Contributing to Jasmine
We welcome your contributions! Thanks for helping make Jasmine a better project
for everyone. If you want to contribute but don't know what to work on,
[issues tagged help needed](https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Ajasmine+label%3A%22help+needed%22+)
should have enough detail to get started.
## Before Submitting a Pull Request
1. Ensure all specs are green in browsers *and* node.
* Use `npm test` to test in Node.
* Use `npm run serve` to test in browsers.
2. Fix any eslint or prettier errors reported at the end of `npm test`. Prettier
errors can be automatically fixed by running `npm run cleanup`.
3. Build `jasmine.js` with `npm run build` and run all specs again. This
ensures that your changes self-test well.
5. Revert your changes to `jasmine.js` and `jasmine-html.js`. When we accept
your pull request, we will generate these files as a separate commit and
merge the entire branch into master.
We only accept green pull requests. If you see that the CI build failed, please
fix it. Feel free to ask for help if you're stuck.
## Background
### Directory Structure
* `/src` contains all of the source files
* `/src/core` - generic source files
* `/src/html` - browser-specific files
* `/src/boot` - sources for boot files (see below)
* `/spec` contains all of the tests
* mirrors the source directory
* there are some additional files
* `/lib` contains the compiled copy of Jasmine. This is used to self-test and
distributed as the `jasmine-core` Node, and Ruby packages.
### Self-testing
Jasmine tests itself. The files in `lib` are loaded first, defining the reference `jasmine`. Then the files in `src` are loaded, defining the reference `jasmineUnderTest`. So there are two copies of the code loaded under test.
The tests should always use `jasmineUnderTest` to refer to the objects and functions that are being tested. But the tests can use functions on `jasmine` as needed. _Be careful how you structure any new test code_. Copy the patterns you see in the existing code - this ensures that the code you're testing is not leaking into the `jasmine` reference and vice-versa.
### `boot0.js` and `boot1.js`
These files file does all of the setup necessary for Jasmine to work in a
browser. They load all of the code, create an `Env`, attach the global
functions, and build the reporter. It also sets up the execution of the
`Env` - for browsers this is in `window.onload`. While the default in `lib`
is appropriate for browsers, projects may wish to customize this file.
### Compatibility
Jasmine runs in both Node and a variety of browsers. See the README for the
list of currently supported environments.
## Development
All source code belongs in `src/`. The `core/` directory contains the bulk of Jasmine's functionality. This code should remain browser- and environment-agnostic. If your feature or fix cannot be, as mentioned above, please degrade gracefully. Any code that depends on a browser (specifically, it expects `window` to be the global or `document` is present) should live in `src/html/`.
### Install Dev Dependencies
Jasmine Core relies on Node.js.
To install the Node dependencies, you will need Node.js and npm.
$ npm install
...will install all of the node modules locally. Now run
$ npm test
...you should see tests run and eslint checking formatting.
### How to write new Jasmine code
Or, How to make a successful pull request
* _Do not change the public interface_. Lots of projects depend on Jasmine and
if you aren't careful you'll break them.
* _Be environment agnostic_. Some people run their specs in browsers, others in
Node. Jasmine should support them all as much as possible.
* _Be browser agnostic_ - if you must rely on browser-specific functionality,
please write it in a way that degrades gracefully.
* _Write specs_ - Jasmine's a testing framework. Don't add functionality
without test-driving it.
* _Write code in the style of the rest of the repo_ - Jasmine should look like
a cohesive whole.
* _Ensure the *entire* test suite is green_ in all the big browsers, Node, and
ESLint/Prettier. Your contribution shouldn't break Jasmine for other users.
Follow these tips and your pull request, patch, or suggestion is much more likely to be integrated.
### Running Specs
Be sure to run the tests in at least one supported Node version and at least a
couple of supported browsers. To run the tests in Node, simply use `npm test`
as described above. To run the tests in a browser, run `npm run serve` and then
visit `http://localhost:8888`.
If you have the necessary Selenium drivers installed (e.g. geckodriver or
chromedriver), you can also use Jasmine's CI tooling:
$ JASMINE_BROWSER=<name of browser> npm run ci
### Submitting a Pull Requeset
Once you've done the steps listed under "Before Submitting a Pull Request"
above, you can submit a pull request via the
[standard GitHub process](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
TL;DR: Fork the repository, push your work up to your fork, and create a PR from
there.

95
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,95 @@
name: Bug Report
description: I think I've found a bug in Jasmine
labels: ["bug report"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug. Please follow these steps first.
## Troubleshooting
Please take the time to rule out issues with your code or third party libraries before filing a bug report. If you are reporting an error, try to determine whether the error is coming from Jasmine, another library, or your own code.
Check the [FAQ](https://jasmine.github.io/pages/faq.html) and any other relevant [documentation](https://jasmine.github.io/pages/docs_home.html) to see if your issue has already been addressed.
## Special troubleshooting steps for asynchronous scenarios
If the issue has to do with testing asynchronous code, please read the [async tutorial](https://jasmine.github.io/tutorials/async) and the [async section of the FAQ](https://jasmine.github.io/pages/faq.html#async). In particular, check for the following common errors:
* Are you trying to write a synchronous test for asynchronous code?
* Does the test signal completion before the code under test finishes?
* Do expectations run before the code that they're trying to verify?
## Try the latest version of Jasmine
If at all possible, upgrade to the latest versions of `jasmine-core` and any other relevant packages (e.g. `jasmine`, `jasmine-browser-runner`). If you can't do that, please check the [release notes](https://github.com/jasmine/jasmine/tree/main/release_notes) for all newer versions to make sure that the bug hasn't already been fixed.
## Explain how to reproduce the bug
**Working steps to reproduce are required for all bug reports.** Please help us help you by creating complete but minimal instructions for reproducing the bug.
The steps to reproduce could be:
* A code snippet that reproduces the problem when run by itself in a newly generated empty `jasmine` or `jasmine-browser-runner` project, or in the standalone distribution.
* A set of steps that reproduce the problem when followed exactly as they're written in an empty directory.
* A link to a Git repository or zip/tar file containing a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). This option is required for all bugs that can only be reproduced with third-party libraries, including Angular and Karma.
Please **test your steps** by starting with an empty directory and following them exactly as they're written. Bug reports with steps to reproduce that are unclear, don't work, or include an unreasonable amount of extraneous code will likely be closed.
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: What do you think should have happened?
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual Behavior
description: What happened instead?
validations:
required: true
- type: textarea
id: possible-solution
attributes:
label: Possible Solution
description: This is optional, but if you have an idea for how to fix the bug we'd like to hear it.
- type: textarea
id: context
attributes:
label: Context
description: How has this issue affected you? What are you trying to accomplish? By providing context, you can help us come up with a solution that is most useful in the real world.
- type: input
id: jasmine-core-version
attributes:
label: jasmine-core version
validations:
required: true
- type: textarea
id: other-versions
attributes:
label: Versions of other relevant packages
placeholder: |
jasmine-browser-runner 1.2.0
fancy-reporter 132.4.8
- type: input
id: browser-or-node-version
attributes:
label: Node.js and/or browser version
placeholder: E.g. "node 16.2.0" or "Safari 15"
validations:
required: true
- type: input
id: os
attributes:
label: Operating System
placeholder: E.g. "Windows 10", "MacOS 12.5", "MCC Interim Linux 0.99.p8"
validations:
required: true

17
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: Questions, requests for help, etc
url: https://github.com/jasmine/jasmine/discussions/new/choose
about: Please start a discussion.
- name: Issues with the `jasmine` CLI
url: https://github.com/jasmine/jasmine-npm/issues
about: Please create issues related to the `jasmine` package in its repository.
- name: Issues with jasmine-browser-runner
url: https://github.com/jasmine/jasmine-browser-runner/issues
about: Please create issues related to the `jasmine-browser-runner` package in its repository.
- name: Documentation issues
url: https://github.com/jasmine/jasmine.github.io/issues
about: Please create documentation issues in the docs repository.
- name: TypeScript issues
url: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions
about: Please create issues related to TypeScript compilation errors or other problems with type definitions at DefinitelyTyped.

View File

@@ -0,0 +1,31 @@
name: Feature Proposal
description: I'd like to propose a new feature
labels: ["feature request"]
body:
- type: markdown
attributes:
value: Thanks for taking the time to propose a new feature. Although Jasmine is mostly feature complete, we're always open to hearing new ideas.
- type: textarea
id: description
attributes:
label: Feature Proposal
validations:
required: true
- type: textarea
id: context
attributes:
label: Context
description: How would this feature be useful to you? What are you trying to accomplish? By providing context, you can help us come up with a solution that is most useful in the real world.
validations:
required: true
- type: textarea
id: example
attributes:
label: Example
description: If you're proposing a new API or something similar, please show an example of how it would be used.
render: JavaScript
- type: textarea
id: other-info
attributes:
label: Other Information
description: Anything else that you think would be helpful.

30
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,30 @@
<!--- Provide a general summary of your changes in the Title above -->
## Description
<!--- Describe your changes in detail -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the [**CONTRIBUTING**](https://github.com/jasmine/jasmine/blob/main/.github/CONTRIBUTING.md) guide.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

8
.gitignore vendored
View File

@@ -11,14 +11,16 @@ site/
.bundle
tags
Gemfile.lock
package-lock.json
yarn.lock
pkg/*
.sass-cache/*
src/html/.sass-cache/*
node_modules/
*.pyc
sauce_connect.log
*.swp
build/
*.egg-info/
dist/*.tar.gz
dist
nbproject/
*.iml
.envrc

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "pages"]
path = pages
url = https://github.com/pivotal/jasmine.git

View File

@@ -1,9 +0,0 @@
{
"bitwise": true,
"curly": true,
"immed": true,
"newcap": true,
"trailing": true,
"loopfunc": true,
"quotmark": "single"
}

View File

@@ -1,23 +0,0 @@
dist/
grunt/
images/
node_modules
release_notes/
spec/
src/
Gemfile
Gemfile.lock
Rakefile
jasmine-core.gemspec
.rspec
.travis.yml
.jshintrc
.gitignore
*.sh
Gruntfile.js
lib/jasmine-core/boot/
lib/jasmine-core/boot.js
lib/jasmine-core/spec
lib/jasmine-core/*.css
lib/jasmine-core/jasmine-html.js
lib/jasmine-core/version.rb

3
.prettierrc Normal file
View File

@@ -0,0 +1,3 @@
{
"singleQuote": true
}

1
.rspec
View File

@@ -1 +0,0 @@
--color

View File

@@ -1,51 +0,0 @@
---
script: $TEST_COMMAND
language: ruby
cache: bundler
rvm: 1.9.3
env:
global:
- USE_SAUCE=true
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- TEST_COMMAND="bash travis-core-script.sh"
- JASMINE_BROWSER="firefox"
- SAUCE_OS="Linux"
- SAUCE_BROWSER_VERSION=''
- secure: WSPWhlnC4mWSnSPquX+m1/BCu5ch5NygkaHuM2Nea7lD8oS3XLX8QncZZAsQ4lnNfqoDDuBOizG0AESiqNvE4y6x5qvLLTS6q+ce255ZEMZ71TBdZgDEEvGMEjOPPsVXiXyTQOP1lwOPlrbZvaPgWV7e11KIBab6DfFcQpnvDgo=
- secure: SW7CJhZnwaNT749Gdnhvqb5rbXlAOsygUAzh9qhtyvbqXKkmJdBIEsO01YF6pbju1X2twE9JvWCOxeZju43NgQChJlPsGbjY2j3k/TdQeTAJesQe2K7ytwghunI30gjEovtRH0T3w1EmcKPH8yj5eBIcB2OYoJHx8KEC7e68q1g=
matrix:
include:
- env:
- USE_SAUCE=false
- TEST_COMMAND="bash travis-node-script.sh"
- env:
- JASMINE_BROWSER="safari"
- SAUCE_OS="OS X 10.8"
- SAUCE_BROWSER_VERSION=6
- env:
- JASMINE_BROWSER="safari"
- SAUCE_OS="OS X 10.6"
- SAUCE_BROWSER_VERSION=5
- env:
- JASMINE_BROWSER="internet explorer"
- SAUCE_OS="Windows 8"
- SAUCE_BROWSER_VERSION=10
- env:
- JASMINE_BROWSER="internet explorer"
- SAUCE_OS="Windows 7"
- SAUCE_BROWSER_VERSION=9
- env:
- JASMINE_BROWSER="internet explorer"
- SAUCE_OS="Windows 7"
- SAUCE_BROWSER_VERSION=8
- env:
- JASMINE_BROWSER="chrome"
- SAUCE_OS="Linux"
- SAUCE_BROWSER_VERSION=''
- env:
- JASMINE_BROWSER="phantomjs"
- USE_SAUCE=false
- env:
- USE_SAUCE=false
- JASMINE_BROWSER="phantomjs"
- TEST_COMMAND="bash travis-docs-script.sh"

46
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at jasmine-maintainers@googlegroups.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -1,121 +0,0 @@
# Developing for Jasmine Core
We welcome your contributions - Thanks for helping make Jasmine a better project for everyone. Please review the backlog and discussion lists (the main group - [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js) and the developer's list - [http://groups.google.com/group/jasmine-js-dev](http://groups.google.com/group/jasmine-js-dev)) before starting work - what you're looking for may already have been done. If it hasn't, the community can help make your contribution better.
## General Workflow
Please submit pull requests via feature branches using the semi-standard workflow of:
1. Fork it
1. Clone your fork: (`git clone git@github.com:yourUserName/jasmine.git`)
1. Change directory: (`cd jasmine`)
1. Asign original repository to a remote named 'upstream': (`git remote add
upstream https://github.com/pivotal/jasmine.git`)
1. Pull in changes not present in your local repository: (`git fetch upstream`)
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request
We favor pull requests with very small, single commits with a single purpose.
## Background
### Directory Structure
* `/src` contains all of the source files
* `/src/console` - Node.js-specific files
* `/src/core` - generic source files
* `/src/html` - browser-specific files
* `/spec` contains all of the tests
* mirrors the source directory
* there are some additional files
* `/dist` contains the standalone distributions as zip files
* `/lib` contains the generated files for distribution as the Jasmine Rubygem and the Python package
### Self-testing
Note that Jasmine tests itself. The files in `lib` are loaded first, defining the reference `jasmine`. Then the files in `src` are loaded, defining the reference `j$`. So there are two copies of the code loaded under test.
The tests should always use `j$` to refer to the objects and functions that are being tested. But the tests can use functions on `jasmine` as needed. _Be careful how you structure any new test code_. Copy the patterns you see in the existing code - this ensures that the code you're testing is not leaking into the `jasmine` reference and vice-versa.
### `boot.js`
__This is new for Jasmine 2.0.__
This file does all of the setup necessary for Jasmine to work. It loads all of the code, creates an `Env`, attaches the global functions, and builds the reporter. It also sets up the execution of the `Env` - for browsers this is in `window.onload`. While the default in `lib` is appropriate for browsers, projects may wish to customize this file.
For example, for Jasmine development there is a different `dev_boot.js` for Jasmine development that does more work.
### Compatibility
* Browser Minimum
* IE8
* Firefox 3.x
* Chrome ??
* Safari 5
## Development
All source code belongs in `src/`. The `core/` directory contains the bulk of Jasmine's functionality. This code should remain browser- and environment-agnostic. If your feature or fix cannot be, as mentioned above, please degrade gracefully. Any code that should only be in a non-browser environment should live in `src/console/`. Any code that depends on a browser (specifically, it expects `window` to be the global or `document` is present) should live in `src/html/`.
### Install Dependencies
Jasmine Core relies on Ruby and Node.js.
To install the Ruby dependencies, you will need Ruby, Rubygems, and Bundler available. Then:
$ bundle
...will install all of the Ruby dependencies.
To install the Node dependencies, you will need Node.js, Npm, and [Grunt](http://gruntjs.com/), the [grunt-cli](https://github.com/gruntjs/grunt-cli) and ensure that `grunt` is on your path.
$ npm install --local
...will install all of the node modules locally. If when you run
$ grunt
...you see that JSHint runs your system is ready.
### How to write new Jasmine code
Or, How to make a successful pull request
* _Do not change the public interface_. Lots of projects depend on Jasmine and if you aren't careful you'll break them
* _Be environment agnostic_ - server-side developers are just as important as browser developers
* _Be browser agnostic_ - if you must rely on browser-specific functionality, please write it in a way that degrades gracefully
* _Write specs_ - Jasmine's a testing framework; don't add functionality without test-driving it
* _Write code in the style of the rest of the repo_ - Jasmine should look like a cohesive whole
* _Ensure the *entire* test suite is green_ in all the big browsers, Node, and JSHint - your contribution shouldn't break Jasmine for other users
Follow these tips and your pull request, patch, or suggestion is much more likely to be integrated.
### Running Specs
Jasmine uses the [Jasmine Ruby gem](http://github.com/pivotal/jasmine-gem) to test itself in browser.
$ rake jasmine
...and then visit `http://localhost:8888` to run specs.
Jasmine uses Node.js with a custom runner to test outside of a browser.
$ grunt execSpecsInNode
...and then the results will print to the console. All specs run except those that expect a browser (the specs in `spec/html` are ignored).
## Before Committing or Submitting a Pull Request
1. Ensure all specs are green in browser *and* node
1. Ensure JSHint is green with `grunt jsHint`
1. Build `jasmine.js` with `grunt buildDistribution` and run all specs again - this ensures that your changes self-test well
## Submitting a Pull Request
1. Revert your changes to `jasmine.js` and `jasmine-html.js`
* We do this because `jasmine.js` and `jasmine-html.js` are auto-generated (as you've seen in the previous steps) and accepting multiple pull requests when this auto-generated file changes causes lots of headaches.
1. When we accept your pull request, we will generate these files as a separate commit and merge the entire branch into master.
Note that we use Travis for Continuous Integration. We only accept green pull requests.

View File

@@ -1,64 +0,0 @@
# (Vague) Jasmine 2.0 Goals/(Guidelines)
1. No globals!
* jasmine library is entirely inside `jasmine` namespace
* globals required for backwards compatibility should be added in `boot.js` (EG, var describe = jasmine.getCurrentEnv().describe lives in boot.js)
1. Don't use properties as getters. Use methods.
* Properties aren't encapsulated -- can be mutated, unsafe.
1. Reporters get data objects (no methods).
* easier to refactor as needed
1. More unit tests - fewer nasty integration tests
## Remaining non-story-able work:
* Make a `TODO` list
### Hard
* Finish killing Globals
* Guidelines:
* New objects can have constructors on `jasmine`
* Top level functions can live on `jasmine`
* Top level (i.e., any `jasmine` property) should only be referenced inside the `Env` constructor
* should better allow any object to get jasmine code (Node-friendly)
* review everything in base.js
* Remove isA functions:
* isArray_ - used in matchers and spies
* isString_
* isDOMNode_
* isA_
* unimplementedMethod_, used by PrettyPrinter
* jasmine.util should be util closure inside of env or something
* argsToArray is used for Spies and matching (and can be replaced)
* inherit is only for PrettyPrinter now
* formatException is used only inside Env/spec
* htmlEscape is for messages in matchers - should this be HTML at all?
* Pretty printing
* move away from pretty printer and to a JSON.stringify implementation?
* jasmineToString vs. custom toString ?
### Easy
* unify params to ctors: options vs. attrs.
* This will be a lot of the TODOs, but clean up & simplify Env.js (is this a 2.1 task?)
### DONE
* Matchers improvements
* unit testable DONE
* better equality (from Underscore) DONE
* addCustomMatchers doesn't explode stack DONE
* refactor equals function so that it just loops & recurses over a list of fns (custom and built-in) - 2.1? (Tracker story)
* Spies
* break these out into their own tests/file DONE
## Other Topics
* Docs
* Docco has gone over well. Should we annotate all the sources and then have Pages be more complex, having tutorials and annotated source like Backbone? Are we small enough?
* Need examples for:
* How to build a Custom Matcher
* How to add a custom equality tester

12
Gemfile
View File

@@ -1,12 +0,0 @@
source 'https://rubygems.org'
gem "jasmine", :git => 'https://github.com/pivotal/jasmine-gem.git'
# gem "jasmine", path: "/Users/pivotal/workspace/jasmine-gem"
unless ENV["TRAVIS"]
group :debug do
gem 'debugger'
end
end
gemspec
gem "anchorman"

View File

@@ -1,53 +0,0 @@
module.exports = function(grunt) {
var pkg = require("./package.json");
global.jasmineVersion = pkg.version;
grunt.initConfig({
pkg: pkg,
jshint: require('./grunt/config/jshint.js'),
concat: require('./grunt/config/concat.js'),
compass: require('./grunt/config/compass.js'),
compress: require('./grunt/config/compress.js')
});
require('load-grunt-tasks')(grunt);
grunt.loadTasks('grunt/tasks');
grunt.registerTask('default', ['jshint:all']);
var version = require('./grunt/tasks/version.js');
var standaloneBuilder = require('./grunt/tasks/build_standalone.js');
grunt.registerTask('build:copyVersionToGem',
"Propagates the version from package.json to version.rb",
version.copyToGem);
grunt.registerTask('buildDistribution',
'Builds and lints jasmine.js, jasmine-html.js, jasmine.css',
[
'compass',
'jshint:beforeConcat',
'concat',
'jshint:afterConcat',
'build:copyVersionToGem'
]
);
grunt.registerTask("execSpecsInNode",
"Run Jasmine core specs in Node.js",
function() {
var exitInfo = require("shelljs").exec("node_modules/.bin/jasmine");
if (exitInfo.code !== 0) {
grunt.fail.fatal("Specs Failed", exitInfo.code);
}
}
);
grunt.registerTask("execSpecsInNode:performance",
"Run Jasmine performance specs in Node.js",
function() {
require("shelljs").exec("node_modules/.bin/jasmine JASMINE_CONFIG_PATH=spec/support/jasmine-performance.json");
}
);
};

View File

@@ -1,4 +1,5 @@
Copyright (c) 2008-2014 Pivotal Labs
Copyright (c) 2008-2019 Pivotal Labs
Copyright (c) 2008-2025 The Jasmine developers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -1,5 +0,0 @@
recursive-include . *.py
include lib/jasmine-core/*.js
include lib/jasmine-core/*.css
include images/*.png
include package.json

View File

@@ -1,64 +1,64 @@
<a name="README">[<img src="https://rawgithub.com/pivotal/jasmine/master/images/jasmine-horizontal.svg" width="400px" />](http://jasmine.github.io)</a>
<a name="README"><img src="https://raw.githubusercontent.com/jasmine/jasmine/main/images/jasmine-horizontal.svg" width="400px" alt="Jasmine"></a>
[![Build Status](https://travis-ci.org/pivotal/jasmine.png?branch=master)](https://travis-ci.org/pivotal/jasmine) [![Code Climate](https://codeclimate.com/github/pivotal/jasmine.png)](https://codeclimate.com/github/pivotal/jasmine)
=======
**A JavaScript Testing Framework**
# A JavaScript Testing Framework
Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, [Node.js](http://nodejs.org) projects, or anywhere that JavaScript can run.
Documentation & guides live here: [http://jasmine.github.io](http://jasmine.github.io/)
For a quick start guide of Jasmine 2.0, see the beginning of [http://jasmine.github.io/2.0/introduction.html](http://jasmine.github.io/2.0/introduction.html)
Upgrading from Jasmine 1.x? Check out the [2.0 release notes](https://github.com/pivotal/jasmine/blob/v2.0.0/release_notes/20.md) for a list of what's new (including breaking interface changes).
Upgrading from Jasmine 4.x? Check out the [upgrade guide](https://jasmine.github.io/tutorials/upgrading_to_Jasmine_5.0).
## Contributing
Please read the [contributors' guide](https://github.com/pivotal/jasmine/blob/master/CONTRIBUTING.md)
Please read the [contributors' guide](https://github.com/jasmine/jasmine/blob/main/.github/CONTRIBUTING.md).
## Installation
To install Jasmine on your local box:
There are several different ways to install Jasmine, depending on your
environment and how you'd like to use it. See the [Getting Started page](https://jasmine.github.io/pages/getting_started.html)
for details.
* Clone Jasmine - `git clone https://github.com/pivotal/jasmine.git`
* Create a Jasmine directory in your project - `mkdir my-project/jasmine`
* Move latest dist to your project directory - `mv jasmine/dist/jasmine-standalone-2.0.0.zip my-project/jasmine`
* Change directory - `cd my-project/jasmine`
* Unzip the dist - `unzip jasmine-standalone-2.0.0.zip`
## Usage
Add the following to your HTML file:
See the [documentation site](https://jasmine.github.io/pages/docs_home.html),
particularly the [Your First Suite tutorial](https://jasmine.github.io/tutorials/your_first_suite)
for information on writing specs, and [the FAQ](https://jasmine.github.io/pages/faq.html).
<link rel="shortcut icon" type="image/png" href="jasmine/lib/jasmine-2.0.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="jasmine/lib/jasmine-2.0.0/jasmine.css">
## Supported environments
<script type="text/javascript" src="jasmine/lib/jasmine-2.0.0/jasmine.js"></script>
<script type="text/javascript" src="jasmine/lib/jasmine-2.0.0/jasmine-html.js"></script>
<script type="text/javascript" src="jasmine/lib/jasmine-2.0.0/boot.js"></script>
Jasmine tests itself across popular browsers (Safari, Chrome, Firefox, and
Microsoft Edge) as well as Node.
For the Jasmine Ruby Gem:<br>
[https://github.com/pivotal/jasmine-gem](https://github.com/pivotal/jasmine-gem)
| Environment | Supported versions |
|-------------------|----------------------------------|
| Node | 18.20.5+*, 20, 22, 24 |
| Safari | 15*, 16*, 17* |
| Chrome | Evergreen |
| Firefox | Evergreen, 102*, 115*, 128*, 140 |
| Edge | Evergreen |
For the Jasmine Python Egg:<br>
[https://github.com/pivotal/jasmine-py](https://github.com/pivotal/jasmine-py)
For evergreen browsers, each version of Jasmine is tested against the version of the browser that is available to us
at the time of release. Other browsers, as well as older & newer versions of some supported browsers, are likely to work.
However, Jasmine isn't tested against them and they aren't actively supported.
\* Supported on a best-effort basis. Support for these versions may be dropped
if it becomes impractical, and bugs affecting only these versions may not be
treated as release blockers.
## Support
* Search past discussions: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js)
* Send an email to the list: [jasmine-js@googlegroups.com](mailto:jasmine-js@googlegroups.com)
* View the project backlog at Pivotal Tracker: [http://www.pivotaltracker.com/projects/10606](http://www.pivotaltracker.com/projects/10606)
* Follow us on Twitter: [@JasmineBDD](http://twitter.com/JasmineBDD)
To find out what environments work with a particular Jasmine release, see the [release notes](https://github.com/jasmine/jasmine/tree/main/release_notes).
## Maintainers
* [Davis W. Frank](mailto:dwfrank@pivotallabs.com), Pivotal Labs
* [Rajan Agaskar](mailto:rajan@pivotallabs.com), Pivotal Labs
* [Sheel Choksi](mailto:schoksi@pivotallabs.com), Pivotal Labs
* [Gwendolyn Van Hove](mailto:gwen@slackersoft.net)
* [Steve Gravrock](mailto:sdg@panix.com)
### Maintainers Emeritus
* [Christian Williams](mailto:antixian666@gmail.com), Square
* [Davis W. Frank](mailto:dwfrank@pivotal.io)
* [Rajan Agaskar](mailto:rajan@pivotal.io)
* [Greg Cobb](mailto:gcobb@pivotal.io)
* [Chris Amavisca](mailto:camavisca@pivotal.io)
* [Christian Williams](mailto:antixian666@gmail.com)
* Sheel Choksi
Copyright (c) 2008-2014 Pivotal Labs. This software is licensed under the MIT License.
Copyright (c) 2008-2019 Pivotal Labs<br>
Copyright (c) 2008-2025 The Jasmine developers<br>
This software is licensed under the [MIT License](https://github.com/jasmine/jasmine/blob/main/LICENSE).

View File

@@ -7,60 +7,61 @@ Follow the instructions in `CONTRIBUTING.md` during development.
### Git Rules
Please work on feature branches.
Please attempt to keep commits to `master` small, but cohesive. If a feature is contained in a bunch of small commits (e.g., it has several wip commits or small work), please squash them when merging back to `master`.
Please attempt to keep commits to `main` small, but cohesive. If a feature is contained in a bunch of small commits (e.g., it has several wip commits or small work), please squash them when pushing to `main`.
### Version
We attempt to stick to [Semantic Versioning](http://semver.org/). Most of the time, development should be against a new minor version - fixing bugs and adding new features that are backwards compatible.
The current version lives in the file `/package.json`. This file should be set to the version that is _currently_ under development. That is, if version 1.0.0 is the current release then version should be incremented say, to 1.1.0.
The current version lives in the file `/package.json`. This version will be
copied to `jasmine.js` when the distribution is built. When releasing a new
version, update `package.json` with the new version and `npm run build` to
update the gem version number.
This version is used by both `jasmine.js` and the `jasmine-core` Ruby gem.
Note that Jasmine should only use the "patch" version number if the new release
contains only bug fixes.
Note that Jasmine should *not* use the "patch" version number. Let downstream projects rev their patch versions as needed, keeping their major and minor version numbers in sync with Jasmine core.
### Update the Github Pages (as needed)
___Note: This is going to change right after 2.0___
Github pages have to exist in a branch called `gh-pages` in order for their app to serve them. This repo adds that branch as a submodule under the `pages` directory. This is a bit of a hack, but it allows us to work with the pages and the source at the same time and with one set of rake tasks.
If you want to submit changes to this repo and aren't a Pivotal Labs employee, you can fork and work in the `gh-pages` branch. You won't be able to edit the pages in the submodule off of master.
When `jasmine-core` revs its major or minor version, the `jasmine` NPM package
should also rev to that version.
## Release
When ready to release - specs are all green and the stories are done:
1. Update the release notes in `release_notes` - use the Anchorman gem to generate the markdown file and edit accordingly
1. Update the version in `package.json` to a release candidate
1. Update any links or top-level landing page for the Github Pages
1. Update the release notes in `release_notes` - use the Anchorman gem to generate the markdown file and edit accordingly. Include a list of supported environments.
1. Update the version in `package.json`
1. Run `npm run build`.
### Commit and push core changes
1. Commit release notes and version changes (jasmine.js, package.json)
2. Push
3. Tag the release and push the tag.
4. Wait for Circle CI to go green
### Build standalone distribution
1. Build the standalone distribution with `grunt buildStandaloneDist`
1. Make sure you add the new ZIP file to git
1. Should we still do this? Given we want to use guthub releases...
1. Build the standalone distribution with `npm run buildStandaloneDist`
1. This will generate `dist/jasmine-standalone-<version>.zip`, which you will upload later (see "Finally" below).
### Release the Python egg
### Release the core NPM module
1. `python setup.py register sdist upload` You will need pypi credentials to upload the egg.
1. `npm login` to save your credentials locally
2. `npm publish .` to publish what's in `package.json`
### Release the Ruby gem
### Release the docs
1. Copy version to the Ruby gem with `grunt build:copyVersionToGem`
1. __NOTE__: You will likely need to point to a local jasmine gem in order to run tests locally. _Do not_ push this version of the Gemfile.
1. __NOTE__: You will likely need to push a new jasmine gem with a dependent version right after this release.
1. Push these changes to GitHub and verify that this SHA is green
1. `rake release` - tags the repo with the version, builds the `jasmine-core` gem, pushes the gem to Rubygems.org. In order to release you will have to ensure you have rubygems creds locally.
Probably only need to do this when releasing a minor version, and not a patch
version. See [the README file in the docs repo](https://github.com/jasmine/jasmine.github.io/blob/master/README.md)
for instructions.
### Finally
### Release the `jasmine` NPM package
1. Visit the [Releases page for Jasmine](https://github.com/pivotal/jasmine/releases), find the tag just pushed.
1. Paste in a link to the correct release notes for this release. The link should reference the blob and tag correctly, and the markdown file for the notes.
1. If it is a pre-release, mark it as such.
1. Attach the standalone zipfile
See <https://github.com/jasmine/jasmine-npm/blob/main/RELEASE.md>.
### Publish the GitHub release
There should be a post to Pivotal Labs blog and a tweet to that link.
1. Visit the releases page and find the tag just published.
2. Paste in a link to the correct release notes for this release.
3. If it is a pre-release, mark it as such.
4. Attach the standalone zipfile.

View File

@@ -1,18 +0,0 @@
require "bundler"
Bundler::GemHelper.install_tasks
require "json"
require "jasmine"
unless ENV["JASMINE_BROWSER"] == 'phantomjs'
require "jasmine_selenium_runner"
end
load "jasmine/tasks/jasmine.rake"
namespace :jasmine do
task :set_env do
ENV['JASMINE_CONFIG_PATH'] ||= 'spec/support/jasmine.yml'
end
end
task "jasmine:configure" => "jasmine:set_env"
task :default => "jasmine:ci"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

56
eslint.config.mjs Normal file
View File

@@ -0,0 +1,56 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default defineConfig([{
extends: compat.extends("plugin:compat/recommended"),
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
// 2022 isn't exactly right, but it's the earliest version that allows
// private properties.
ecmaVersion: 2022,
sourceType: "commonjs",
},
rules: {
curly: "error",
quotes: ["error", "single", {
avoidEscape: true,
}],
"no-unused-vars": ["error", {
args: "none",
}],
"no-implicit-globals": "error",
"block-spacing": "error",
"func-call-spacing": ["error", "never"],
"key-spacing": "error",
"no-tabs": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
semi: ["error", "always"],
"space-before-blocks": "error",
"no-eval": "error",
"no-var": "error",
"no-debugger": "error",
"no-console": "error",
},
}]);

View File

@@ -1,10 +0,0 @@
module.exports = {
jasmine: {
options: {
cssDir: 'lib/jasmine-core/',
sassDir: 'src/html',
outputStyle: 'compact',
noLineComments: true,
}
}
};

View File

@@ -1,66 +0,0 @@
var standaloneLibDir = "lib/jasmine-" + jasmineVersion;
function root(path) { return "./" + path; }
function libJasmineCore(path) { return root("lib/jasmine-core/" + path); }
function libConsole() { return "lib/console/" }
function dist(path) { return root("dist/" + path); }
module.exports = {
standalone: {
options: {
archive: root("dist/jasmine-standalone-" + global.jasmineVersion + ".zip")
},
files: [
{ src: [ root("MIT.LICENSE") ] },
{
src: [ "jasmine_favicon.png"],
dest: standaloneLibDir,
expand: true,
cwd: root("images")
},
{
src: [
"jasmine.js",
"jasmine-html.js",
"jasmine.css"
],
dest: standaloneLibDir,
expand: true,
cwd: libJasmineCore("")
},
{
src: [
"console.js"
],
dest: standaloneLibDir,
expand: true,
cwd: libConsole()
},
{
src: [ "boot.js" ],
dest: standaloneLibDir,
expand: true,
cwd: libJasmineCore("boot")
},
{
src: [ "SpecRunner.html" ],
dest: root(""),
expand: true,
cwd: dist("tmp")
},
{
src: [ "*.js" ],
dest: "src",
expand: true,
cwd: libJasmineCore("example/src/")
},
{
src: [ "*.js" ],
dest: "spec",
expand: true,
cwd: libJasmineCore("example/spec/")
}
]
}
};

View File

@@ -1,61 +0,0 @@
var grunt = require('grunt');
function license() {
var currentYear = "" + new Date(Date.now()).getFullYear();
return grunt.template.process(
grunt.file.read("grunt/templates/licenseBanner.js.jst"),
{ data: { currentYear: currentYear}});
}
module.exports = {
'jasmine-html': {
src: [
'src/html/requireHtml.js',
'src/html/HtmlReporter.js',
'src/html/HtmlSpecFilter.js',
'src/html/ResultsNode.js',
'src/html/QueryString.js'
],
dest: 'lib/jasmine-core/jasmine-html.js'
},
jasmine: {
src: [
'src/core/requireCore.js',
'src/core/matchers/requireMatchers.js',
'src/core/base.js',
'src/core/util.js',
'src/core/Spec.js',
'src/core/Env.js',
'src/core/JsApiReporter.js',
'src/core/PrettyPrinter',
'src/core/Suite',
'src/core/**/*.js',
'src/version.js'
],
dest: 'lib/jasmine-core/jasmine.js'
},
boot: {
src: ['lib/jasmine-core/boot/boot.js'],
dest: 'lib/jasmine-core/boot.js'
},
nodeBoot: {
src: ['lib/jasmine-core/boot/node_boot.js'],
dest: 'lib/jasmine-core/node_boot.js'
},
console: {
src: [
'src/console/requireConsole.js',
'src/console/ConsoleReporter.js'
],
dest: 'lib/console/console.js'
},
options: {
banner: license(),
process: {
data: {
version: global.jasmineVersion
}
}
}
};

View File

@@ -1,11 +0,0 @@
module.exports = {
beforeConcat: ['src/**/*.js'],
afterConcat: [
'lib/jasmine-core/jasmine-html.js',
'lib/jasmine-core/jasmine.js'
],
options: {
jshintrc: '.jshintrc'
},
all: ['src/**/*.js']
};

View File

@@ -1,31 +0,0 @@
var grunt = require("grunt");
function standaloneTmpDir(path) { return "dist/tmp/" + path; }
grunt.registerTask("build:compileSpecRunner",
"Processes the spec runner template and writes to a tmp file",
function() {
var runnerHtml = grunt.template.process(
grunt.file.read("grunt/templates/SpecRunner.html.jst"),
{ data: { jasmineVersion: global.jasmineVersion }});
grunt.file.write(standaloneTmpDir("SpecRunner.html"), runnerHtml);
}
);
grunt.registerTask("build:cleanSpecRunner",
"Deletes the tmp spec runner file",
function() {
grunt.file.delete(standaloneTmpDir(""));
}
);
grunt.registerTask("buildStandaloneDist",
"Builds a standalone distribution",
[
"buildDistribution",
"build:compileSpecRunner",
"compress:standalone",
"build:cleanSpecRunner"
]
);

View File

@@ -1,14 +0,0 @@
var grunt = require("grunt");
function gemLib(path) { return './lib/jasmine-core/' + path; }
function nodeToRuby(version) { return version.replace('-', '.'); }
module.exports = {
copyToGem: function() {
var versionRb = grunt.template.process(
grunt.file.read("grunt/templates/version.rb.jst"),
{ data: { jasmineVersion: nodeToRuby(global.jasmineVersion) }});
grunt.file.write(gemLib("version.rb"), versionRb);
}
};

View File

@@ -1,26 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jasmine Spec Runner v<%= jasmineVersion %></title>
<link rel="shortcut icon" type="image/png" href="lib/jasmine-<%= jasmineVersion %>/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="lib/jasmine-<%= jasmineVersion %>/jasmine.css">
<script type="text/javascript" src="lib/jasmine-<%= jasmineVersion %>/jasmine.js"></script>
<script type="text/javascript" src="lib/jasmine-<%= jasmineVersion %>/jasmine-html.js"></script>
<script type="text/javascript" src="lib/jasmine-<%= jasmineVersion %>/boot.js"></script>
<!-- include source files here... -->
<script type="text/javascript" src="src/Player.js"></script>
<script type="text/javascript" src="src/Song.js"></script>
<!-- include spec files here... -->
<script type="text/javascript" src="spec/SpecHelper.js"></script>
<script type="text/javascript" src="spec/PlayerSpec.js"></script>
</head>
<body>
</body>
</html>

View File

@@ -1,9 +0,0 @@
#
# DO NOT Edit this file. Canonical version of Jasmine lives in the repo's package.json. This file is generated
# by a grunt task when the standalone release is built.
#
module Jasmine
module Core
VERSION = "<%= jasmineVersion %>"
end
end

View File

View File

@@ -1,23 +0,0 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "jasmine-core/version"
Gem::Specification.new do |s|
s.name = "jasmine-core"
s.version = Jasmine::Core::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Rajan Agaskar", "Davis W. Frank", "Christian Williams"]
s.summary = %q{JavaScript BDD framework}
s.description = %q{Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.}
s.email = %q{jasmine-js@googlegroups.com}
s.homepage = "http://pivotal.github.com/jasmine"
s.rubyforge_project = "jasmine-core"
s.license = "MIT"
s.files = Dir.glob("./lib/**/*") + Dir.glob("./lib/jasmine-core/spec/**/*.js")
s.require_paths = ["lib"]
s.add_development_dependency "rake"
s.add_development_dependency "sauce-connect"
s.add_development_dependency "compass"
s.add_development_dependency "jasmine_selenium_runner", ">= 0.2.0"
end

View File

@@ -1,165 +0,0 @@
/*
Copyright (c) 2008-2014 Pivotal Labs
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
function getJasmineRequireObj() {
if (typeof module !== 'undefined' && module.exports) {
return exports;
} else {
window.jasmineRequire = window.jasmineRequire || {};
return window.jasmineRequire;
}
}
getJasmineRequireObj().console = function(jRequire, j$) {
j$.ConsoleReporter = jRequire.ConsoleReporter();
};
getJasmineRequireObj().ConsoleReporter = function() {
var noopTimer = {
start: function(){},
elapsed: function(){ return 0; }
};
function ConsoleReporter(options) {
var print = options.print,
showColors = options.showColors || false,
onComplete = options.onComplete || function() {},
timer = options.timer || noopTimer,
specCount,
failureCount,
failedSpecs = [],
pendingCount,
ansi = {
green: '\x1B[32m',
red: '\x1B[31m',
yellow: '\x1B[33m',
none: '\x1B[0m'
};
this.jasmineStarted = function() {
specCount = 0;
failureCount = 0;
pendingCount = 0;
print('Started');
printNewline();
timer.start();
};
this.jasmineDone = function() {
printNewline();
for (var i = 0; i < failedSpecs.length; i++) {
specFailureDetails(failedSpecs[i]);
}
if(specCount > 0) {
printNewline();
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
failureCount + ' ' + plural('failure', failureCount);
if (pendingCount) {
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
}
print(specCounts);
} else {
print('No specs found');
}
printNewline();
var seconds = timer.elapsed() / 1000;
print('Finished in ' + seconds + ' ' + plural('second', seconds));
printNewline();
onComplete(failureCount === 0);
};
this.specDone = function(result) {
specCount++;
if (result.status == 'pending') {
pendingCount++;
print(colored('yellow', '*'));
return;
}
if (result.status == 'passed') {
print(colored('green', '.'));
return;
}
if (result.status == 'failed') {
failureCount++;
failedSpecs.push(result);
print(colored('red', 'F'));
}
};
return this;
function printNewline() {
print('\n');
}
function colored(color, str) {
return showColors ? (ansi[color] + str + ansi.none) : str;
}
function plural(str, count) {
return count == 1 ? str : str + 's';
}
function repeat(thing, times) {
var arr = [];
for (var i = 0; i < times; i++) {
arr.push(thing);
}
return arr;
}
function indent(str, spaces) {
var lines = (str || '').split('\n');
var newArr = [];
for (var i = 0; i < lines.length; i++) {
newArr.push(repeat(' ', spaces).join('') + lines[i]);
}
return newArr.join('\n');
}
function specFailureDetails(result) {
printNewline();
print(result.fullName);
for (var i = 0; i < result.failedExpectations.length; i++) {
var failedExpectation = result.failedExpectations[i];
printNewline();
print(indent(failedExpectation.stack, 2));
}
printNewline();
}
}
return ConsoleReporter;
};

View File

@@ -1,2 +1,88 @@
module.exports = require("./jasmine-core/jasmine.js");
module.exports.boot = require('./jasmine-core/node_boot.js');
/**
* Note: Only available on Node.
* @module jasmine-core
*/
const jasmineRequire = require('./jasmine-core/jasmine.js');
module.exports = jasmineRequire;
const boot = (function() {
let jasmine, jasmineInterface;
return function bootWithoutGlobals(reinitialize) {
if (!jasmineInterface || reinitialize === true) {
jasmine = jasmineRequire.core(jasmineRequire);
const env = jasmine.getEnv({ suppressLoadErrors: true });
jasmineInterface = jasmineRequire.interface(jasmine, env);
}
return {jasmine, jasmineInterface};
};
}());
/**
* Boots a copy of Jasmine and returns an object as described in {@link jasmine}.
* If boot is called multiple times, the same object is returned every time
* unless true is passed.
* @param {boolean} [reinitialize=false] Whether to create a new copy of Jasmine if one already exists
* @type {function}
* @return {jasmine}
*/
module.exports.boot = function(reinitialize) {
const {jasmine, jasmineInterface} = boot(reinitialize);
for (const k in jasmineInterface) {
global[k] = jasmineInterface[k];
}
return jasmine;
};
/**
* Boots a copy of Jasmine and returns an object containing the properties
* that would normally be added to the global object. If noGlobals is called
* multiple times, the same object is returned every time unless true is passed.
*
* @param {boolean} [reinitialize=false] Whether to create a new copy of Jasmine if one already exists
* @example
* const {describe, beforeEach, it, expect, jasmine} = require('jasmine-core').noGlobals();
*/
module.exports.noGlobals = function(reinitialize) {
const {jasmineInterface} = boot(reinitialize);
return jasmineInterface;
};
const path = require('path'),
fs = require('fs');
const rootPath = path.join(__dirname, 'jasmine-core'),
bootFiles = ['boot0.js', 'boot1.js'],
legacyBootFiles = ['boot.js'],
cssFiles = [],
jsFiles = [],
jsFilesToSkip = ['jasmine.js'].concat(bootFiles, legacyBootFiles);
fs.readdirSync(rootPath).forEach(function(file) {
if(fs.statSync(path.join(rootPath, file)).isFile()) {
switch(path.extname(file)) {
case '.css':
cssFiles.push(file);
break;
case '.js':
if (jsFilesToSkip.indexOf(file) < 0) {
jsFiles.push(file);
}
break;
}
}
});
module.exports.files = {
self: __filename,
path: rootPath,
bootDir: rootPath,
bootFiles: bootFiles,
cssFiles: cssFiles,
jsFiles: ['jasmine.js'].concat(jsFiles),
imagesDir: path.join(__dirname, '../images')
};

View File

@@ -1,53 +0,0 @@
module Jasmine
module Core
class << self
def path
File.join(File.dirname(__FILE__), "jasmine-core")
end
def js_files
(["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq - boot_files - node_boot_files
end
SPEC_TYPES = ["core", "html", "node"]
def core_spec_files
spec_files("core")
end
def html_spec_files
spec_files("html")
end
def node_spec_files
spec_files("node")
end
def boot_files
["boot.js"]
end
def node_boot_files
["node_boot.js"]
end
def boot_dir
path
end
def spec_files(type)
raise ArgumentError.new("Unrecognized spec type") unless SPEC_TYPES.include?(type)
(Dir.glob(File.join(path, "spec", type, "*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq
end
def css_files
Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) }
end
def images_dir
File.join(File.dirname(__FILE__), '../images')
end
end
end
end

View File

@@ -1 +0,0 @@
from .core import Core

View File

@@ -1,203 +0,0 @@
/*
Copyright (c) 2008-2014 Pivotal Labs
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.
[jasmine-gem]: http://github.com/pivotal/jasmine-gem
*/
(function() {
/**
* ## Require &amp; Instantiate
*
* Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
*/
window.jasmine = jasmineRequire.core(jasmineRequire);
/**
* Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
*/
jasmineRequire.html(jasmine);
/**
* Create the Jasmine environment. This is used to run all specs in a project.
*/
var env = jasmine.getEnv();
/**
* ## The Global Interface
*
* Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
*/
var jasmineInterface = {
describe: function(description, specDefinitions) {
return env.describe(description, specDefinitions);
},
xdescribe: function(description, specDefinitions) {
return env.xdescribe(description, specDefinitions);
},
it: function(desc, func) {
return env.it(desc, func);
},
xit: function(desc, func) {
return env.xit(desc, func);
},
beforeEach: function(beforeEachFunction) {
return env.beforeEach(beforeEachFunction);
},
afterEach: function(afterEachFunction) {
return env.afterEach(afterEachFunction);
},
expect: function(actual) {
return env.expect(actual);
},
pending: function() {
return env.pending();
},
spyOn: function(obj, methodName) {
return env.spyOn(obj, methodName);
},
jsApiReporter: new jasmine.JsApiReporter({
timer: new jasmine.Timer()
})
};
/**
* Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
*/
if (typeof window == "undefined" && typeof exports == "object") {
extend(exports, jasmineInterface);
} else {
extend(window, jasmineInterface);
}
/**
* Expose the interface for adding custom equality testers.
*/
jasmine.addCustomEqualityTester = function(tester) {
env.addCustomEqualityTester(tester);
};
/**
* Expose the interface for adding custom expectation matchers
*/
jasmine.addMatchers = function(matchers) {
return env.addMatchers(matchers);
};
/**
* Expose the mock interface for the JavaScript timeout functions
*/
jasmine.clock = function() {
return env.clock;
};
/**
* ## Runner Parameters
*
* More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
*/
var queryString = new jasmine.QueryString({
getWindowLocation: function() { return window.location; }
});
var catchingExceptions = queryString.getParam("catch");
env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
/**
* ## Reporters
* The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
*/
var htmlReporter = new jasmine.HtmlReporter({
env: env,
onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); },
getContainer: function() { return document.body; },
createElement: function() { return document.createElement.apply(document, arguments); },
createTextNode: function() { return document.createTextNode.apply(document, arguments); },
timer: new jasmine.Timer()
});
/**
* The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript.
*/
env.addReporter(jasmineInterface.jsApiReporter);
env.addReporter(htmlReporter);
/**
* Filter which specs will be run by matching the start of the full name against the `spec` query param.
*/
var specFilter = new jasmine.HtmlSpecFilter({
filterString: function() { return queryString.getParam("spec"); }
});
env.specFilter = function(spec) {
return specFilter.matches(spec.getFullName());
};
/**
* Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.
*/
window.setTimeout = window.setTimeout;
window.setInterval = window.setInterval;
window.clearTimeout = window.clearTimeout;
window.clearInterval = window.clearInterval;
/**
* ## Execution
*
* Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
*/
var currentWindowOnload = window.onload;
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
htmlReporter.initialize();
env.execute();
};
/**
* Helper function for readability above.
*/
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
}
}());

View File

@@ -1,181 +0,0 @@
/**
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.
[jasmine-gem]: http://github.com/pivotal/jasmine-gem
*/
(function() {
/**
* ## Require &amp; Instantiate
*
* Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
*/
window.jasmine = jasmineRequire.core(jasmineRequire);
/**
* Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
*/
jasmineRequire.html(jasmine);
/**
* Create the Jasmine environment. This is used to run all specs in a project.
*/
var env = jasmine.getEnv();
/**
* ## The Global Interface
*
* Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
*/
var jasmineInterface = {
describe: function(description, specDefinitions) {
return env.describe(description, specDefinitions);
},
xdescribe: function(description, specDefinitions) {
return env.xdescribe(description, specDefinitions);
},
it: function(desc, func) {
return env.it(desc, func);
},
xit: function(desc, func) {
return env.xit(desc, func);
},
beforeEach: function(beforeEachFunction) {
return env.beforeEach(beforeEachFunction);
},
afterEach: function(afterEachFunction) {
return env.afterEach(afterEachFunction);
},
expect: function(actual) {
return env.expect(actual);
},
pending: function() {
return env.pending();
},
spyOn: function(obj, methodName) {
return env.spyOn(obj, methodName);
},
jsApiReporter: new jasmine.JsApiReporter({
timer: new jasmine.Timer()
})
};
/**
* Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
*/
if (typeof window == "undefined" && typeof exports == "object") {
extend(exports, jasmineInterface);
} else {
extend(window, jasmineInterface);
}
/**
* Expose the interface for adding custom equality testers.
*/
jasmine.addCustomEqualityTester = function(tester) {
env.addCustomEqualityTester(tester);
};
/**
* Expose the interface for adding custom expectation matchers
*/
jasmine.addMatchers = function(matchers) {
return env.addMatchers(matchers);
};
/**
* Expose the mock interface for the JavaScript timeout functions
*/
jasmine.clock = function() {
return env.clock;
};
/**
* ## Runner Parameters
*
* More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
*/
var queryString = new jasmine.QueryString({
getWindowLocation: function() { return window.location; }
});
var catchingExceptions = queryString.getParam("catch");
env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
/**
* ## Reporters
* The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
*/
var htmlReporter = new jasmine.HtmlReporter({
env: env,
onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); },
getContainer: function() { return document.body; },
createElement: function() { return document.createElement.apply(document, arguments); },
createTextNode: function() { return document.createTextNode.apply(document, arguments); },
timer: new jasmine.Timer()
});
/**
* The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript.
*/
env.addReporter(jasmineInterface.jsApiReporter);
env.addReporter(htmlReporter);
/**
* Filter which specs will be run by matching the start of the full name against the `spec` query param.
*/
var specFilter = new jasmine.HtmlSpecFilter({
filterString: function() { return queryString.getParam("spec"); }
});
env.specFilter = function(spec) {
return specFilter.matches(spec.getFullName());
};
/**
* Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.
*/
window.setTimeout = window.setTimeout;
window.setInterval = window.setInterval;
window.clearTimeout = window.clearTimeout;
window.clearInterval = window.clearInterval;
/**
* ## Execution
*
* Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
*/
var currentWindowOnload = window.onload;
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
htmlReporter.initialize();
env.execute();
};
/**
* Helper function for readability above.
*/
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
}
}());

View File

@@ -1,71 +0,0 @@
module.exports = function(jasmineRequire) {
var jasmine = jasmineRequire.core(jasmineRequire);
var consoleFns = require('../console/console.js');
consoleFns.console(consoleFns, jasmine);
var env = jasmine.getEnv();
var jasmineInterface = {
describe: function(description, specDefinitions) {
return env.describe(description, specDefinitions);
},
xdescribe: function(description, specDefinitions) {
return env.xdescribe(description, specDefinitions);
},
it: function(desc, func) {
return env.it(desc, func);
},
xit: function(desc, func) {
return env.xit(desc, func);
},
beforeEach: function(beforeEachFunction) {
return env.beforeEach(beforeEachFunction);
},
afterEach: function(afterEachFunction) {
return env.afterEach(afterEachFunction);
},
expect: function(actual) {
return env.expect(actual);
},
spyOn: function(obj, methodName) {
return env.spyOn(obj, methodName);
},
jsApiReporter: new jasmine.JsApiReporter({
timer: new jasmine.Timer()
}),
jasmine: jasmine
};
extend(global, jasmineInterface);
jasmine.addCustomEqualityTester = function(tester) {
env.addCustomEqualityTester(tester);
};
jasmine.addMatchers = function(matchers) {
return env.addMatchers(matchers);
};
jasmine.clock = function() {
return env.clock;
};
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
}
return jasmine;
};

66
lib/jasmine-core/boot0.js Normal file
View File

@@ -0,0 +1,66 @@
/*
Copyright (c) 2008-2019 Pivotal Labs
Copyright (c) 2008-2025 The Jasmine developers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
This file starts the process of "booting" Jasmine. It initializes Jasmine,
makes its globals available, and creates the env. This file should be loaded
after `jasmine.js` and `jasmine_html.js`, but before `boot1.js` or any project
source files or spec files are loaded.
*/
(function() {
const jasmineRequire = window.jasmineRequire || require('./jasmine.js');
/**
* ## Require &amp; Instantiate
*
* Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
*/
const jasmine = jasmineRequire.core(jasmineRequire),
global = jasmine.getGlobal();
global.jasmine = jasmine;
/**
* Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
*/
jasmineRequire.html(jasmine);
/**
* Create the Jasmine environment. This is used to run all specs in a project.
*/
const env = jasmine.getEnv();
/**
* ## The Global Interface
*
* Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
*/
const jasmineInterface = jasmineRequire.interface(jasmine, env);
/**
* Add all of the Jasmine global/public interface to the global scope, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
*/
for (const property in jasmineInterface) {
global[property] = jasmineInterface[property];
}
})();

134
lib/jasmine-core/boot1.js Normal file
View File

@@ -0,0 +1,134 @@
/*
Copyright (c) 2008-2019 Pivotal Labs
Copyright (c) 2008-2025 The Jasmine developers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
This file finishes 'booting' Jasmine, performing all of the necessary
initialization before executing the loaded environment and all of a project's
specs. This file should be loaded after `boot0.js` but before any project
source files or spec files are loaded. Thus this file can also be used to
customize Jasmine for a project.
If a project is using Jasmine via the standalone distribution, this file can
be customized directly. If you only wish to configure the Jasmine env, you
can load another file that calls `jasmine.getEnv().configure({...})`
after `boot0.js` is loaded and before this file is loaded.
*/
(function() {
const env = jasmine.getEnv();
/**
* ## Runner Parameters
*
* More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
*/
const queryString = new jasmine.QueryString({
getWindowLocation: function() {
return window.location;
}
});
const filterSpecs = !!queryString.getParam('spec');
const config = {
stopOnSpecFailure: queryString.getParam('stopOnSpecFailure'),
stopSpecOnExpectationFailure: queryString.getParam(
'stopSpecOnExpectationFailure'
),
hideDisabled: queryString.getParam('hideDisabled')
};
const random = queryString.getParam('random');
if (random !== undefined && random !== '') {
config.random = random;
}
const seed = queryString.getParam('seed');
if (seed) {
config.seed = seed;
}
/**
* ## Reporters
* The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
*/
const htmlReporter = new jasmine.HtmlReporter({
env: env,
navigateWithNewParam: function(key, value) {
return queryString.navigateWithNewParam(key, value);
},
addToExistingQueryString: function(key, value) {
return queryString.fullStringWithNewParam(key, value);
},
getContainer: function() {
return document.body;
},
createElement: function() {
return document.createElement.apply(document, arguments);
},
createTextNode: function() {
return document.createTextNode.apply(document, arguments);
},
timer: new jasmine.Timer(),
filterSpecs: filterSpecs
});
/**
* The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript.
*/
env.addReporter(jsApiReporter);
env.addReporter(htmlReporter);
/**
* Filter which specs will be run by matching the start of the full name against the `spec` query param.
*/
const specFilter = new jasmine.HtmlSpecFilter({
filterString: function() {
return queryString.getParam('spec');
}
});
config.specFilter = function(spec) {
return specFilter.matches(spec.getFullName());
};
env.configure(config);
/**
* ## Execution
*
* Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
*/
const currentWindowOnload = window.onload;
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
htmlReporter.initialize();
env.execute();
};
})();

View File

@@ -1,60 +0,0 @@
import pkg_resources
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
class Core(object):
@classmethod
def js_package(cls):
return __package__
@classmethod
def css_package(cls):
return __package__
@classmethod
def image_package(cls):
return __package__ + ".images"
@classmethod
def js_files(cls):
js_files = sorted(list(filter(lambda x: '.js' in x, pkg_resources.resource_listdir(cls.js_package(), '.'))))
# jasmine.js needs to be first
js_files.insert(0, 'jasmine.js')
# boot needs to be last
js_files.remove('boot.js')
js_files.append('boot.js')
return cls._uniq(js_files)
@classmethod
def css_files(cls):
return cls._uniq(sorted(filter(lambda x: '.css' in x, pkg_resources.resource_listdir(cls.css_package(), '.'))))
@classmethod
def favicon(cls):
return 'jasmine_favicon.png'
@classmethod
def _uniq(self, items, idfun=None):
# order preserving
if idfun is None:
def idfun(x): return x
seen = {}
result = []
for item in items:
marker = idfun(item)
# in old Python versions:
# if seen.has_key(marker)
# but in new ones:
if marker in seen:
continue
seen[marker] = 1
result.append(item)
return result

View File

@@ -0,0 +1,24 @@
class Player {
play(song) {
this.currentlyPlayingSong = song;
this.isPlaying = true;
}
pause() {
this.isPlaying = false;
}
resume() {
if (this.isPlaying) {
throw new Error('song is already playing');
}
this.isPlaying = true;
}
makeFavorite() {
this.currentlyPlayingSong.persistFavoriteStatus(true);
}
}
module.exports = Player;

View File

@@ -0,0 +1,8 @@
class Song {
persistFavoriteStatus(value) {
// something complicated
throw new Error('not yet implemented');
}
}
module.exports = Song;

View File

@@ -3,11 +3,11 @@ beforeEach(function () {
toBePlaying: function () {
return {
compare: function (actual, expected) {
var player = actual;
const player = actual;
return {
pass: player.currentlyPlayingSong === expected && player.isPlaying
}
};
}
};
}

View File

@@ -1,36 +1,37 @@
describe("Player", function() {
var Player = require('../../jasmine_examples/Player.js');
var Song = require('../../jasmine_examples/Song.js');
var player;
var song;
const Player = require('../../lib/jasmine_examples/Player');
const Song = require('../../lib/jasmine_examples/Song');
describe('Player', function() {
let player;
let song;
beforeEach(function() {
player = new Player();
song = new Song();
});
it("should be able to play a Song", function() {
it('should be able to play a Song', function() {
player.play(song);
expect(player.currentlyPlayingSong).toEqual(song);
//demonstrates use of custom matcher
// demonstrates use of custom matcher
expect(player).toBePlaying(song);
});
describe("when song has been paused", function() {
describe('when song has been paused', function() {
beforeEach(function() {
player.play(song);
player.pause();
});
it("should indicate that the song is currently paused", function() {
it('should indicate that the song is currently paused', function() {
expect(player.isPlaying).toBeFalsy();
// demonstrates use of 'not' with a custom matcher
expect(player).not.toBePlaying(song);
});
it("should be possible to resume", function() {
it('should be possible to resume', function() {
player.resume();
expect(player.isPlaying).toBeTruthy();
expect(player.currentlyPlayingSong).toEqual(song);
@@ -38,7 +39,7 @@ describe("Player", function() {
});
// demonstrates use of spies to intercept and test method calls
it("tells the current song if the user has made it a favorite", function() {
it('tells the current song if the user has made it a favorite', function() {
spyOn(song, 'persistFavoriteStatus');
player.play(song);
@@ -48,13 +49,13 @@ describe("Player", function() {
});
//demonstrates use of expected exceptions
describe("#resume", function() {
it("should throw an exception if song is already playing", function() {
describe('#resume', function() {
it('should throw an exception if song is already playing', function() {
player.play(song);
expect(function() {
player.resume();
}).toThrowError("song is already playing");
}).toThrowError('song is already playing');
});
});
});

View File

@@ -1,24 +0,0 @@
function Player() {
}
Player.prototype.play = function(song) {
this.currentlyPlayingSong = song;
this.isPlaying = true;
};
Player.prototype.pause = function() {
this.isPlaying = false;
};
Player.prototype.resume = function() {
if (this.isPlaying) {
throw new Error("song is already playing");
}
this.isPlaying = true;
};
Player.prototype.makeFavorite = function() {
this.currentlyPlayingSong.persistFavoriteStatus(true);
};
module.exports = Player;

View File

@@ -1,9 +0,0 @@
function Song() {
}
Song.prototype.persistFavoriteStatus = function(value) {
// something complicated
throw new Error("not yet implemented");
};
module.exports = Song;

View File

@@ -1,34 +1,34 @@
describe("Player", function() {
var player;
var song;
describe('Player', function() {
let player;
let song;
beforeEach(function() {
player = new Player();
song = new Song();
});
it("should be able to play a Song", function() {
it('should be able to play a Song', function() {
player.play(song);
expect(player.currentlyPlayingSong).toEqual(song);
//demonstrates use of custom matcher
// demonstrates use of custom matcher
expect(player).toBePlaying(song);
});
describe("when song has been paused", function() {
describe('when song has been paused', function() {
beforeEach(function() {
player.play(song);
player.pause();
});
it("should indicate that the song is currently paused", function() {
it('should indicate that the song is currently paused', function() {
expect(player.isPlaying).toBeFalsy();
// demonstrates use of 'not' with a custom matcher
expect(player).not.toBePlaying(song);
});
it("should be possible to resume", function() {
it('should be possible to resume', function() {
player.resume();
expect(player.isPlaying).toBeTruthy();
expect(player.currentlyPlayingSong).toEqual(song);
@@ -36,7 +36,7 @@ describe("Player", function() {
});
// demonstrates use of spies to intercept and test method calls
it("tells the current song if the user has made it a favorite", function() {
it('tells the current song if the user has made it a favorite', function() {
spyOn(song, 'persistFavoriteStatus');
player.play(song);
@@ -46,13 +46,13 @@ describe("Player", function() {
});
//demonstrates use of expected exceptions
describe("#resume", function() {
it("should throw an exception if song is already playing", function() {
describe('#resume', function() {
it('should throw an exception if song is already playing', function() {
player.play(song);
expect(function() {
player.resume();
}).toThrowError("song is already playing");
}).toThrowError('song is already playing');
});
});
});

View File

@@ -3,11 +3,11 @@ beforeEach(function () {
toBePlaying: function () {
return {
compare: function (actual, expected) {
var player = actual;
const player = actual;
return {
pass: player.currentlyPlayingSong === expected && player.isPlaying
}
};
}
};
}

View File

@@ -1,22 +1,22 @@
function Player() {
}
Player.prototype.play = function(song) {
this.currentlyPlayingSong = song;
this.isPlaying = true;
};
Player.prototype.pause = function() {
this.isPlaying = false;
};
Player.prototype.resume = function() {
if (this.isPlaying) {
throw new Error("song is already playing");
class Player {
play(song) {
this.currentlyPlayingSong = song;
this.isPlaying = true;
}
this.isPlaying = true;
};
pause() {
this.isPlaying = false;
}
Player.prototype.makeFavorite = function() {
this.currentlyPlayingSong.persistFavoriteStatus(true);
};
resume() {
if (this.isPlaying) {
throw new Error('song is already playing');
}
this.isPlaying = true;
}
makeFavorite() {
this.currentlyPlayingSong.persistFavoriteStatus(true);
}
}

View File

@@ -1,7 +1,6 @@
function Song() {
class Song {
persistFavoriteStatus(value) {
// something complicated
throw new Error('not yet implemented');
}
}
Song.prototype.persistFavoriteStatus = function(value) {
// something complicated
throw new Error("not yet implemented");
};

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,478 +0,0 @@
/*
http://www.JSON.org/json2.js
2009-08-17
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
replacer an optional parameter that determines how object
values are stringified for objects. It can be a
function or an array of strings.
space an optional parameter that specifies the indentation
of nested structures. If it is omitted, the text will
be packed without extra whitespace. If it is a number,
it will specify the number of spaces to indent at each
level. If it is a string (such as '\t' or '&nbsp;'),
it contains the characters used to indent at each level.
This method produces a JSON text from a JavaScript value.
When an object value is found, if the object contains a toJSON
method, its toJSON method will be called and the result will be
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
will be passed the key associated with the value, and this will be
bound to the value
For example, this would serialize Dates as ISO strings.
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
You can provide an optional replacer method. It will be passed the
key and value of each member, with this bound to the containing
object. The value that is returned from your method will be
serialized. If your method returns undefined, then the member will
be excluded from the serialization.
If the replacer parameter is an array of strings, then it will be
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.
Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects will be
dropped; in arrays they will be replaced with null. You can use
a replacer function to replace those with JSON values.
JSON.stringify(undefined) returns undefined.
The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.
If the space parameter is a non-empty string, then that string will
be used for indentation. If the space parameter is a number, then
the indentation will be that many spaces.
Example:
text = JSON.stringify(['e', {pluribus: 'unum'}]);
// text is '["e",{"pluribus":"unum"}]'
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
});
// text is '["Date(---current time---)"]'
JSON.parse(text, reviver)
This method parses a JSON text to produce an object or array.
It can throw a SyntaxError exception.
The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.
Example:
// Parse the text. Values that look like ISO date strings will
// be converted to Date objects.
myData = JSON.parse(text, function (key, value) {
var a;
if (typeof value === 'string') {
a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
if (a) {
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+a[5], +a[6]));
}
}
return value;
});
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
var d;
if (typeof value === 'string' &&
value.slice(0, 5) === 'Date(' &&
value.slice(-1) === ')') {
d = new Date(value.slice(5, -1));
if (d) {
return d;
}
}
return value;
});
This is a reference implementation. You are free to copy, modify, or
redistribute.
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
NOT CONTROL.
*/
/*jslint evil: true */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
*/
"use strict";
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
if (!this.JSON) {
this.JSON = {};
}
(function () {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON !== 'function') {
Date.prototype.toJSON = function (key) {
return isFinite(this.valueOf()) ?
this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z' : null;
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ?
'"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' :
'"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0 ? '[]' :
gap ? '[\n' + gap +
partial.join(',\n' + gap) + '\n' +
mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
k = rep[i];
if (typeof k === 'string') {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0 ? '{}' :
gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
mind + '}' : '{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/.
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
// If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse');
};
}
}());

View File

@@ -1,93 +0,0 @@
/*
Copyright (c) 2008-2014 Pivotal Labs
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
module.exports = function(jasmineRequire) {
var jasmine = jasmineRequire.core(jasmineRequire);
var consoleFns = require('../console/console.js');
consoleFns.console(consoleFns, jasmine);
var env = jasmine.getEnv();
var jasmineInterface = {
describe: function(description, specDefinitions) {
return env.describe(description, specDefinitions);
},
xdescribe: function(description, specDefinitions) {
return env.xdescribe(description, specDefinitions);
},
it: function(desc, func) {
return env.it(desc, func);
},
xit: function(desc, func) {
return env.xit(desc, func);
},
beforeEach: function(beforeEachFunction) {
return env.beforeEach(beforeEachFunction);
},
afterEach: function(afterEachFunction) {
return env.afterEach(afterEachFunction);
},
expect: function(actual) {
return env.expect(actual);
},
spyOn: function(obj, methodName) {
return env.spyOn(obj, methodName);
},
jsApiReporter: new jasmine.JsApiReporter({
timer: new jasmine.Timer()
}),
jasmine: jasmine
};
extend(global, jasmineInterface);
jasmine.addCustomEqualityTester = function(tester) {
env.addCustomEqualityTester(tester);
};
jasmine.addMatchers = function(matchers) {
return env.addMatchers(matchers);
};
jasmine.clock = function() {
return env.clock;
};
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
}
return jasmine;
};

View File

@@ -1 +0,0 @@
../../spec

View File

@@ -1,9 +0,0 @@
#
# DO NOT Edit this file. Canonical version of Jasmine lives in the repo's package.json. This file is generated
# by a grunt task when the standalone release is built.
#
module Jasmine
module Core
VERSION = "2.0.1"
end
end

View File

@@ -1,23 +1,60 @@
{
"name": "jasmine-core",
"license": "MIT",
"version": "2.0.1",
"version": "5.10.0",
"repository": {
"type": "git",
"url": "https://github.com/pivotal/jasmine.git"
"url": "https://github.com/jasmine/jasmine.git"
},
"description": "Official packaging of Jasmine's core files for use by Node.js projects.",
"homepage": "http://jasmine.github.io",
"keywords": [
"test",
"testing",
"jasmine",
"tdd",
"bdd"
],
"scripts": {
"posttest": "eslint \"src/**/*.js\" \"spec/**/*.js\" && prettier --check \"src/**/*.js\" \"spec/**/*.js\"",
"test": "node scripts/runSpecsInNode.js",
"test:parallel": "node scripts/runSpecsInParallel.js",
"cleanup": "prettier --write \"src/**/*.js\" \"spec/**/*.js\"",
"build": "node scripts/buildDistribution.js",
"buildStandaloneDist": "node scripts/buildStandaloneDist.js",
"serve": "node spec/support/localJasmineBrowser.js",
"serve:performance": "node spec/support/localJasmineBrowser.js jasmine-browser-performance.json",
"ci": "node spec/support/ci.js",
"ci:performance": "node spec/support/ci.js jasmine-browser-performance.json"
},
"description": "Simple JavaScript testing framework for browsers and node.js",
"homepage": "https://jasmine.github.io",
"main": "./lib/jasmine-core.js",
"files": [
"LICENSE",
"README.md",
"images/*.{png,svg}",
"lib/**/*.{js,css}",
"package.json"
],
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.7.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-compass": "~0.6.0",
"grunt-contrib-compress": "~0.5.2",
"shelljs": "~0.1.4",
"glob": "~3.2.9",
"jasmine": "https://github.com/pivotal/jasmine-npm/archive/master.tar.gz",
"load-grunt-tasks": "^0.4.0"
}
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.24.0",
"archiver": "^7.0.1",
"css-url-embed": "^0.1.0",
"ejs": "^3.1.10",
"eslint": "^9.24.0",
"eslint-plugin-compat": "^6.0.2",
"glob": "^10.2.3",
"globals": "^16.0.0",
"jasmine": "^5.0.0",
"jasmine-browser-runner": "github:jasmine/jasmine-browser-runner",
"jsdom": "^26.0.0",
"prettier": "1.17.1",
"sass": "^1.58.3"
},
"browserslist": [
"Safari >= 15",
"Firefox >= 102",
"last 2 Chrome versions",
"last 2 Edge versions"
]
}

22
release_notes/1.3.0.md Normal file
View File

@@ -0,0 +1,22 @@
# Jasmine Core 1.3.0 Release Notes
## Summary
This version was a very incremental release that merged in some pull requests for bug fixes.
## Features
* HTML Runner exposes UI to not swallow Exceptions, instead raising as soon as thrown
* Migrated homepage content to Wiki
* Made a far more useful [tutorial page](http://pivotal.github.com/jasmine)
* Added a `toBeNaN` matcher
## Fixes
* Better detection of in-browser vs. not
* `afterEach` functions will run now even when there is a timeout
* `toBeCloseTo` matcher is more accurate
* More explicit matcher messages for spies
* Better equality comparisons for regular expressions
* Improvements to the Pretty Printer: controllable recursion depth, don't include inherited properties
* Fix where `for` was being used as a property on an object (failed on IE)

12
release_notes/1.3.1.md Normal file
View File

@@ -0,0 +1,12 @@
# Jasmine Core 1.3.1 Release Notes
## Summary
This release is for browser compatibility fixes
## Changes
### Features
Fixing test runner failures in IE 6/7/8

View File

@@ -49,7 +49,7 @@ to determine that there a spec is 'empty'
* [Add package.json to Python egg to get correct version number](http://www.pivotaltracker.com/story/67556148) - Fixes #551
* Allow users to set the maximum length of array that the pretty-printer
will print out - Fixes #323 @mikemoraned and #374 @futuraprime
* `matchersUtil.equals()`` does not expect a matcher as its first argument,
* `matchersUtil.equals()` does not expect a matcher as its first argument,
so send the "actual" value first and the "expected" value second. - Merges #538 from @cbandy
* Add single quote check to `jshint` and fix src files for that - Closes #522
* Remove an `eval` in order to support running jasmine within CSP - Closes #503

25
release_notes/2.0.2.md Normal file
View File

@@ -0,0 +1,25 @@
# Release Notes
## Summary
## Changes
* keep the files for running in a webpage around in the npm package
* Expose files and paths necessary to embed jasmine in an html page for nodejs
* Pull out the building of the jasmine interface so node and web both get the same one.
* Show a dot with color of pending spec when no expectations
* Console reporter prints out failed expectation's message
### Bugs
* Allow mocked Date constructor to be called with a subset of full params
## Pull Requests and Issues
* a disabled suite should call resultCallback with status being disabled
* disabled suite should still call onStart callback
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

83
release_notes/2.1.0.md Normal file
View File

@@ -0,0 +1,83 @@
# Jasmine Core 2.1.0 Release Notes
## Summary
This is the release of Jasmine 2.1.
## Features
- Support for focused specs via `fit` and `fdescribe`
- Support for `beforeAll` and `afterAll`
- Support for an explicit `fail` function, both in synchronous and asynchronous specs
- Allow custom timeout for `beforeEach`, `afterEach`, `beforeAll`, `afterAll` and `it`
- Spies now track return values
- Specs can now specify their own timeouts
- Testing in Node.js via the official Jasmine Node Module
- Spec results now have `suiteResults` method that behaves similarly to to `specResults`
- HtmlReporter shows error alerts for afterAllExceptions
## Bugs
- CI now works for IE8 (this was releated to `ConsoleReporter` below)
- Detect global object properly when getting the jasmine require obj
- Fixes Issue #[569][issue_569] - [Tracker Story #73684570](http://www.pivotaltracker.com/story/73684570)
## Deprecations
### `ConsoleReporter` as part of Jasmine core
The Console Reporter exists nearly entirely for the old manner of running Jasmine's own specs in node.js. As we are now supporting node.js officially, this reporter code no longer needs to be in this repo and instead will be in the Jasmine npm.
For now you will see a deprecation message. It will be removed entirely in Jasmine 3.0.
## Documentation
- Release Notes from previous releases now live at [Jasmine's GitHub release page][releases]. See Tracker Story #[54582902][tracker_1]
- Better instructions for releasing new documentation
[releases]: https://github.com/pivotal/jasmine/releases
[tracker_1]: http://www.pivotaltracker.com/story/54582902
## Pull Requests and Issues
- Simplification of HTMLtags in SpecRunner.html
- Merges #[700][issue_700] from @tkrotoff
- `toContain` works with array-like objects (Arguments, HTMLCollections, etc)
- Merges #[699][issue_699] from @charleshansen
- Fixed isPendingSpecException test title
- Merges #[691][issue_691] from @ertrzyiks
- Fixed an issue with example code in the npm
- Merges #[686][issue_686] from @akoptsov
- When the Jasmine clock is installed and date is mocked, `new Date() instanceof Date` should equal `true` Issue #[678][issue_678] & Issue #[679][issue_679] from @chernetsov
- Support for an explicit `fail` function, both in synchronous and asynchronous specs
- Fixes Issue #[567][issue_567], Issue #[568][issue_568], and Issue #[563][issue_563]
- Allow custom timeout for `beforeEach`, `afterEach`, `beforeAll`, `afterAll` and `it`
- Fixes Issue #[483][issue_483] - specs can now specify their own timeouts
- Spies can track return values
- Fixes Issue #[660][issue_660], Merged Issue #[669][issue_669] from @mkhanal
- Interval handlers can now clear their interval
- Fixes Issue #[655][issue_655] Merged Issue #[658][issue_658] from @tgirardi
- Updated to the latest `json2.js`
- Merges #[616][issue_616] from @apaladox2015
------
_Release Notes generated with [Anchorman](http://github.com/infews/anchorman)_
[issue_569]: http://github.com/pivotal/jasmine/issues/569
[issue_700]: http://github.com/pivotal/jasmine/issues/700
[issue_699]: http://github.com/pivotal/jasmine/issues/699
[issue_691]: http://github.com/pivotal/jasmine/issues/691
[issue_678]: http://github.com/pivotal/jasmine/issues/678
[issue_679]: http://github.com/pivotal/jasmine/issues/679
[issue_567]: http://github.com/pivotal/jasmine/issues/567
[issue_568]: http://github.com/pivotal/jasmine/issues/568
[issue_563]: http://github.com/pivotal/jasmine/issues/563
[issue_483]: http://github.com/pivotal/jasmine/issues/483
[issue_660]: http://github.com/pivotal/jasmine/issues/660
[issue_669]: http://github.com/pivotal/jasmine/issues/669
[issue_655]: http://github.com/pivotal/jasmine/issues/655
[issue_658]: http://github.com/pivotal/jasmine/issues/658
[issue_616]: http://github.com/pivotal/jasmine/issues/616
[issue_686]: http://github.com/pivotal/jasmine/issues/686

14
release_notes/2.1.1.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine Core 2.1.1 Release Notes
## Summary
This is a hotfix release of jasmine core to fix a breaking change with events emitted by the top-level suite
## Issues
- Top-level suite triggers suiteStarted and suiteEnd to be consistent
- Fixes [#706](http://github.com/pivotal/jasmine/issues/706)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

14
release_notes/2.1.2.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine Core 2.1.2 Release Notes
## Summary
This is a hotfix release of jasmine core to fix a breaking change with reporting when all of the specs in a suite are pending.
## Changes
- Suites still run their children even if none are executable
- Fixes [#707](http://github.com/pivotal/jasmine/issues/707)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

21
release_notes/2.1.3.md Normal file
View File

@@ -0,0 +1,21 @@
# Jasmine Core 2.1.3 Release Notes
## Summary
This release is primarily a bug-fix release to clean up some recent regressions.
## Pull Requests & Issues
* Top level suite no longer reports suiteStart and suiteDone
- Fixes [#716](https://github.com/jasmine/jasmine/issues/716)
* Don't keep the expected and actual for a passed expectation
- Fixes [#640](https://github.com/jasmine/jasmine/issues/640)
- Fixes [#690](https://github.com/jasmine/jasmine/issues/690)
* Use the new build env on Travis
- Merges [#712](https://github.com/jasmine/jasmine/issues/712) from @joshk
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

98
release_notes/2.2.0.md Normal file
View File

@@ -0,0 +1,98 @@
# Jasmine Core 2.2.0 Release Notes
## Changes
* `ObjectContaining` no longer tries to track exact mismatches
* HTML reporter keeps extra query params when focusing on a spec or suite
* Check custom properties on Arrays when computing equality
* Better error message if `spyOn` is called without a method name
* Rename `jasmineMatches` to `asymmetricMatch`
* Don't double escape focus spec links
* Jasmine equality checks if either side implements `asymmetricMatch`
* Add asymmetric equality tester to match a string with a RegExp
* Add jshint to node build on Travis for pull request builds
* Restructure node examples directory to look more realistic
## Pull Requests & Issues
* Add a basic bower config
- Fixes [#719](https://github.com/jasmine/jasmine/issues/719)
* Allow `pending` to take a reason and show it in the HtmlReporter
- Fixes [#671](https://github.com/jasmine/jasmine/issues/671)
* Set jasmineGlobal correctly in GJS
- Merges [#757](https://github.com/jasmine/jasmine/issues/757) from @ptomato
- Fixes [#751](https://github.com/jasmine/jasmine/issues/751)
* Fix some SpiderMonkey lint warnings
- Merges [#752](https://github.com/jasmine/jasmine/issues/752) from @ptomato
- Fixes [#751](https://github.com/jasmine/jasmine/issues/751)
* Prevents *Alls from running when runnables are explicitly set
- Fixes [#732](https://github.com/jasmine/jasmine/issues/732)
* Update contribution guide to mention possible ffi dependencies for Ubuntu
- Fixes [#755](https://github.com/jasmine/jasmine/issues/755)
* Fix spelling mistake in contributors guide
- Merges [#746](https://github.com/jasmine/jasmine/issues/746) from @swirlycheetah
* Use new jasmine github repo url
- Merges [#745](https://github.com/jasmine/jasmine/issues/745) rohit
* Allow `createSpyObj` to be called with just an array of method names
- Fixes [#321](https://github.com/jasmine/jasmine/issues/321)
* Add `arrayContaining` matcher
- Merges [#440](https://github.com/jasmine/jasmine/issues/440) from @slackersoft
* Use the stack trace from the Error object if supplied
- Fixes [#734](https://github.com/jasmine/jasmine/issues/734)
* Update readme with link to upgrading doc and mention browser support.
- Fixes [#739](https://github.com/jasmine/jasmine/issues/739)
* Link to the Jasmine NPM module
- Merges [#736](https://github.com/jasmine/jasmine/issues/736) from @moonmaster9000
* Allow null prototype objects to be compared for equality
- Merges [#731](https://github.com/jasmine/jasmine/issues/731) from @rohit
- Fixes [#729](https://github.com/jasmine/jasmine/issues/729)
* Fix URL's of Jasmine repositories on Github
- Merges [#730](https://github.com/jasmine/jasmine/issues/730) from @rohit
* Add `anything` matcher to match any value that is neither null or undefined
- Fixes [#186](https://github.com/jasmine/jasmine/issues/186)
* Allow asymmetric equality testers to preempt their symmetric brethren
- Fixes [#540](https://github.com/jasmine/jasmine/issues/540)
* Check for `ObjectContaining` on either side of equality
- Fixes [#682](https://github.com/jasmine/jasmine/issues/682)
* Display the name of the constructor when pretty printing objects
- Fixes [#598](https://github.com/jasmine/jasmine/issues/598)
* `toMatch` requires the `expected` to be a String or RegExp
- Fixes [#723](https://github.com/jasmine/jasmine/issues/723)
* Better equality comparison of Dom nodes
- Merges [#657](https://github.com/jasmine/jasmine/issues/657) from @alexeibs
* Hide unnecessary files from the npm package
- Fixes [#726](https://github.com/jasmine/jasmine/issues/726)
* Properly record finishing an `xdescribe` so further cleanup works
- Fixes [#724](https://github.com/jasmine/jasmine/issues/724)
* 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](https://github.com/jasmine/jasmine/issues/708)
* Pass through all args from external interface for befores, afters, its
- Fixes [#483](https://github.com/jasmine/jasmine/issues/483)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

15
release_notes/2.2.1.md Normal file
View File

@@ -0,0 +1,15 @@
# Jasmine Core 2.2.1 Release Notes
## Summary
This is a hotfix release to fix the packaging for bower
## Changes
* Fix missing comma on bower.json
- Merges [#763](https://github.com/jasmine/jasmine/issues/763) from @gabrielhpugliese
- Merges [#764](https://github.com/jasmine/jasmine/issues/764) from @joshuacc
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

81
release_notes/2.3.0.md Normal file
View File

@@ -0,0 +1,81 @@
# Jasmine Core 2.3.0 Release Notes
## Changes
* Style disabled specs in the results list
* Use `onclick` directly to better support older webkit
* Don't use deprecated `onComplete` syntax for jasmine-npm
* Allow the clock to be installed for the duration of a single closure
* Add safari 7 & 8 to browser matrix
* Remove unused standaloneBuilder var from Gruntfile
* Add test script to package.json
* Update bower.json keywords to match package.json keywords
* Add keywords to package.json
* refuse to execute an order if it would cause a suite with a beforeAll or afterAll to be re-entered after leaving once
## Pull Requests & Issues
* Specify a main entry point for bower so it can be loaded easier
- Merges [#827](https://github.com/jasmine/jasmine/issues/827) from @davetron5000
* Use `instanceof` when checking Error types in toThrowError
- Fixes [#819](https://github.com/jasmine/jasmine/issues/819)
* Remove periods from bullet points for consistency with rest of document
- Merge [#818](https://github.com/jasmine/jasmine/issues/818) from @lpww
* Subjective readability improvements to CONTRIBUTING.md
- Merge [#815](https://github.com/jasmine/jasmine/issues/815) from @jhamon
* Don't install the clock if the current timing functions aren't the originals
- Fixes [#782](https://github.com/jasmine/jasmine/issues/782)
* Properly pass `j$` to `Any` so it can use other jasmine stuff
- Fixes [#806](https://github.com/jasmine/jasmine/issues/806)
* Correctly handle functions that are scheduled after the clock is uninstalled and reinstalled from within Clock#tick.
- Merges [#804](https://github.com/jasmine/jasmine/issues/804) from @sgravrock
- Fixes [#790](https://github.com/jasmine/jasmine/issues/790).
* Allow user to stop a specs execution when an expectation fails
- Fixes [#577](https://github.com/jasmine/jasmine/issues/577)
* Remove unnecessary conditional
- Merges [#788](https://github.com/jasmine/jasmine/issues/788) from @toddbranch
* Show the name of the constructor function when printing an `any` instead of a `toString` of the entire constructor
- Fixes [#796](https://github.com/jasmine/jasmine/issues/796)
* Don't use hardcoded temporary directory paths
- Merges [#789](https://github.com/jasmine/jasmine/issues/789) from sgravrock
* Execute beforeAll/afterAll once per suite instead of once per child when running focused specs/suites
- Fixes [#773](https://github.com/jasmine/jasmine/issues/773)
* Report children of an xdescribe similarly to how they would be reported if they were themselves x'd out
- Fixes [#774](https://github.com/jasmine/jasmine/issues/774)
- Fixes [#776](https://github.com/jasmine/jasmine/issues/776)
* Fixes issue where mock clock was being used by QueueRunner
- Fixes [#783](https://github.com/jasmine/jasmine/issues/783)
- Fixes [#792](https://github.com/jasmine/jasmine/issues/792)
* add missing semicolon
- Merges [#775](https://github.com/jasmine/jasmine/issues/775) from @joscha
* ObjectContaining matches prototype properties
- Fixes [#769](https://github.com/jasmine/jasmine/issues/769)
* Updates pretty printer to include array properties
- Fixes [#766](https://github.com/jasmine/jasmine/issues/766)
* Update year copyright
- Merges [#768](https://github.com/jasmine/jasmine/issues/768) from @danilovaz
* Allow arrays from different frames or contexts to be equal
- Merges [#767](https://github.com/jasmine/jasmine/issues/767) from @juliemr
- Fixes [#765](https://github.com/jasmine/jasmine/issues/765)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

14
release_notes/2.3.1.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine 2.3.1 Release Notes
## Summary
This release is a packaging update for bower only.
## Pull Requests & Issues
* Point Bower's main field to jasmine.js, which is browser-friendly.
- Merge [#843](https://github.com/jasmine/jasmine/issues/843) from @evoL
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

14
release_notes/2.3.2.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine 2.3.2 Release Notes
## Summary
This is a hotfix release to fix a regression with specs declared without a function body
## Pull Requests & Issues
* A spec without a function provided should be `pending` not `disabled`
- Fixes [#840](https://github.com/jasmine/jasmine/issues/840)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

14
release_notes/2.3.3.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine 2.3.3 Release Notes
## Summary
This is a hotfix release to fix a regression with the execution context for `beforeAll`
## Pull Requests & Issues
* Set the shared user context correctly when executing the top level suite
- Fixes [#846](https://github.com/jasmine/jasmine/issues/846)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

22
release_notes/2.3.4.md Normal file
View File

@@ -0,0 +1,22 @@
# Jasmine 2.3.4 Release Notes
## Summary
This is a hotfix release to fix a regression with execution ordering
## Pull Requests & Issues
* Fix ordering for suites with more than 11 direct children.
- Fixes [#850](https://github.com/jasmine/jasmine/issues/850)
* Update standalone installation instructions to reference the releases page
- Fixes [#603](https://github.com/jasmine/jasmine/issues/603)
* Remove dead CSS class styles
- Merges [#849](https://github.com/jasmine/jasmine/issues/849) from @prather-mcs
- Merges [#848](https://github.com/jasmine/jasmine/issues/848) from @prather-mcs
- Fixes [#847](https://github.com/jasmine/jasmine/issues/847)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

91
release_notes/2.4.0.md Normal file
View File

@@ -0,0 +1,91 @@
# Jasmine Core 2.4.0 Release Notes
## Summary
This release contains a number of fixes and pull requests.
The most notable is probably that Jasmine now supports randomization of spec order
## Changes
* Run jasmine's specs in random order
* Add support for returning run details for reporting randomness
* Use className instead of class when creating DOM elements
## Pull Requests & Issues
* Syntax highlighting in README.md
- Merges [#973](https://github.com/jasmine/jasmine/issues/973) from @brunoqc
* Added a throw error block in describe incase a function with arguments is passed in describe
- Fixes [#896](https://github.com/jasmine/jasmine/issues/896)
- Merges [#955](https://github.com/jasmine/jasmine/issues/955) from @himajasuman
* Remove unused `queueableFn` arg from `onException`
- Fixes [#958](https://github.com/jasmine/jasmine/issues/958)
* Remove unused parameter from toThrowError
- Merges [#957](https://github.com/jasmine/jasmine/issues/957) from @FuzzySockets
* Abort spying when the target cannot be spied upon
- Fixes [#948](https://github.com/jasmine/jasmine/issues/948)
- Merges [#949](https://github.com/jasmine/jasmine/issues/949) from @StephanBijzitter
* Removed GOALS_2.0.md, doesn't seem to be needed anymore
- Merges [#954](https://github.com/jasmine/jasmine/issues/954) from @matthewhuff89
* Change #xit so that it will output a more BDD-style pending message
- Merges [#942](https://github.com/jasmine/jasmine/issues/942) from @lalunamel
- Fixes [#930](https://github.com/jasmine/jasmine/issues/930)
- Fixes [#912](https://github.com/jasmine/jasmine/issues/912)
* Allow tests to run in random order
- Merges [#927](https://github.com/jasmine/jasmine/issues/927) from @marcioj
* Use toString for objects if it has been overriden
- Merges [#929](https://github.com/jasmine/jasmine/issues/929) from @myitcv
- Fixes [#928](https://github.com/jasmine/jasmine/issues/928)
* Fix circles/x from getting cut off on Mac/chrome
- Merges [#932](https://github.com/jasmine/jasmine/issues/932) from @James-Dunn
* Postpone find() until it is needed
- Merges [#924](https://github.com/jasmine/jasmine/issues/924) from @danielalexiuc
- Fixes [#917](https://github.com/jasmine/jasmine/issues/917)
* check for global before assigning
* Reverse suite afterEach behavior to match semantics?
- Merges [#908](https://github.com/jasmine/jasmine/issues/908) from @mcamac
* Use badges from shields.io
- Merges [#902](https://github.com/jasmine/jasmine/issues/902) from @SimenB
* xdescribe marks pending, plus associated tests.
- Merges [#869](https://github.com/jasmine/jasmine/issues/869) from @ljwall
- Fixes [#855](https://github.com/jasmine/jasmine/issues/855)
* Update glob to latest
- Merge [#892](https://github.com/jasmine/jasmine/issues/892) from @obastemur
- Fixes [#891](https://github.com/jasmine/jasmine/issues/891)
* Remove moot `version` property from bower.json
- Merges [#874](https://github.com/jasmine/jasmine/issues/874) from @kkirsche
* add toHaveBeenCalledTimes matcher
- Merges [#871](https://github.com/jasmine/jasmine/issues/871) from @logankd
- Fixes [#853](https://github.com/jasmine/jasmine/issues/853)
* Update CONTRIBUTING.md
- Merges [#856](https://github.com/jasmine/jasmine/issues/856) from @lpww
* Make the HtmlReport CSS classes "unique enough"
- Merges [#851](https://github.com/jasmine/jasmine/issues/851) from @prather-mcs
- Fixes [#844](https://github.com/jasmine/jasmine/issues/844)
* Raise an error when jasmine.any() isn't passed a constructor
- Merges [#854](https://github.com/jasmine/jasmine/issues/854) from @danfinnie
- Fixes [#852](https://github.com/jasmine/jasmine/issues/852)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

11
release_notes/2.4.1.md Normal file
View File

@@ -0,0 +1,11 @@
# Jasmine Core 2.4.1 Release Notes
## Changes
* Run `afterEach` in reverse order declared as before
- Reverts [#908](https://github.com/jasmine/jasmine/issues/908)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

116
release_notes/2.5.0.md Normal file
View File

@@ -0,0 +1,116 @@
# Jasmine 2.5.0 Release Notes
## Summary
This release contains a number of fixes and pull requests.
## Changes
* Rename `j$` to `jasmineUnderTest` for specs
- Please update any pull requests to simplify merging, thanks.
## Pull Requests & Issues
* Prettyprint objects whose constructors have custom toString method
- Fixes [#1019](https://github.com/jasmine/jasmine/issues/1019)
- Merges [#1099](https://github.com/jasmine/jasmine/issues/1099) from @mbildner
* Add gulp-jasmine-browser link to readme
- Fixes [#1089](https://github.com/jasmine/jasmine/issues/1089)
* Exclude lib directory from codeclimate
- Fixes [#1171](https://github.com/jasmine/jasmine/issues/1171)
* Add instructions for testing in IE
- Merges [#1170](https://github.com/jasmine/jasmine/issues/1170) from @benchristel
* Update devDependencies and fix issues from this
- Merges [#1162](https://github.com/jasmine/jasmine/issues/1162) from @amavisca
* Remove runnableLookupTable which is no longer used
- Merges [#1129](https://github.com/jasmine/jasmine/issues/1129) from @gregeninfrank
* Make `toEqual` pass for arrays with equivalent properties
- Merges [#1155](https://github.com/jasmine/jasmine/issues/1155) from @benchristel
* Update ruby version on travis to let rack install
- Merges [#1152](https://github.com/jasmine/jasmine/issues/1152) from @amavisca
* Fix jasmine setup in Electron environment
- Merges [#1079](https://github.com/jasmine/jasmine/issues/1079) from @skupr
- Fixes [#964](https://github.com/jasmine/jasmine/issues/964)
* Improve errors with the domain and how to use the API
- Merges [#1026](https://github.com/jasmine/jasmine/issues/1026) from @dhoko
- Fixes [#1025](https://github.com/jasmine/jasmine/issues/1025)
* The done function now returns null
- Merges [#1062](https://github.com/jasmine/jasmine/issues/1062) from @marneborn
- Fixes [#992](https://github.com/jasmine/jasmine/issues/992)
* Add .editorconfig file
- Merges [#1058](https://github.com/jasmine/jasmine/issues/1058) from @kapke
- Fixes [#1057](https://github.com/jasmine/jasmine/issues/1057)
* Improve error message when passing a non-function to callFake
- Merges [#1059](https://github.com/jasmine/jasmine/issues/1059) from @kapke
- Fixes [#1016](https://github.com/jasmine/jasmine/issues/1016)
* Allow expectations in a global beforeAll or afterAll
- Fixes [#811](https://github.com/jasmine/jasmine/issues/811)
* Correctly tear down spies on inherited methods
- Merges [#1036](https://github.com/jasmine/jasmine/issues/1036) from @benchristel
- Fixes [#737](https://github.com/jasmine/jasmine/issues/737)
* Array equality treats undefined elements as equal however they got in there
- Fixes [#786](https://github.com/jasmine/jasmine/issues/786)
* Add support for a fallback reporter
- Merges [#1009](https://github.com/jasmine/jasmine/issues/1009) from @mauricioborges
* Grunt task for compass should prefix command with 'bundle exec'
- Merges [#1047](https://github.com/jasmine/jasmine/issues/1047) from @d-reinhold
* Fix `toEqual` for Microsoft Edge
- Merges [#1041](https://github.com/jasmine/jasmine/issues/1041) from @everedifice
* Update describe error message to no longer assume errant args are `done`
- Fixes [#896](https://github.com/jasmine/jasmine/issues/896)
* Add toBeGreatThanOrEqual and toBeLessThanOrEqual matchers
- Merges [#1049](https://github.com/jasmine/jasmine/issues/1049) from @rullopat
- Fixes [#1013](https://github.com/jasmine/jasmine/issues/1013)
* Support call count of 0 with toHaveBeenCalledTimes matcher
- Merges [#1048](https://github.com/jasmine/jasmine/issues/1048) from @logankd
- Fixes [#994](https://github.com/jasmine/jasmine/issues/994)
* Correctly clean up spies after a spy is replaced and re-spied upon
- Merges [#1011](https://github.com/jasmine/jasmine/issues/1011) from @bodawei
- Fixes [#1010](https://github.com/jasmine/jasmine/issues/1010)
* remove extra topSuite `queueRunner` construction parameter
- Merges [#1006](https://github.com/jasmine/jasmine/issues/1006) from @jurko-gospodnetic
* add option to shallow clone args in call tracker
- Merges [#1000](https://github.com/jasmine/jasmine/issues/1000) from @a-r-d
- Fixes [#872](https://github.com/jasmine/jasmine/issues/872)
* Update license year range to 2016
- Merges [#1021](https://github.com/jasmine/jasmine/issues/1021) from pra85
* Persist randomize param in 'run all' links
- Merges [#990](https://github.com/jasmine/jasmine/issues/990) from @basawyer
* make DelayedFunctionScheduler update the mockDate
- Fixes [#915](https://github.com/jasmine/jasmine/issues/915)
- Merges [#980](https://github.com/jasmine/jasmine/issues/980) from @andrewiggings
* Allow `spyOn` to allow a respy for functions that have already been spied upon
- Merges [#953](https://github.com/jasmine/jasmine/issues/953) from @guy-mograbi-at-gigaspaces
- Fixes [#931](https://github.com/jasmine/jasmine/issues/931)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

19
release_notes/2.5.1.md Normal file
View File

@@ -0,0 +1,19 @@
# Jasmine 2.5.1 Release Notes
## Pull Requests & Issues
* fallback on assignment when a spy cannot be deleted
- Merges [#1193](https://github.com/jasmine/jasmine/issues/1193) from @seanparmlee
- Fixes [#1189](https://github.com/jasmine/jasmine/issues/1189)
* Fix issue with equality of Arrays in PhantomJS
- Merges [#1192](https://github.com/jasmine/jasmine/issues/1192) from @logankd
- Fixes [#1188](https://github.com/jasmine/jasmine/issues/1188)
* Properly tick date along with clock
- Fixes [#1190](https://github.com/jasmine/jasmine/issues/1190)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

14
release_notes/2.5.2.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine 2.5.2 Release Notes
## Pull Requests & Issues
* Allow currently registered reporters to be cleared
- [jasmine/jasmine-npm#88](https://github.com/jasmine/jasmine-npm/issues/88)
* Use `isFunction` to check for functionness in `callFake`
- Fixes [#1191](https://github.com/jasmine/jasmine/issues/1191)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

108
release_notes/2.6.0.md Normal file
View File

@@ -0,0 +1,108 @@
# Jasmine 2.6.0 Release Notes
## Summary
This release contains a number of fixes and pull requests.
## Pull Requests & Issues
Updating introduction url to last version
- Merges [#1316](https://github.com/jasmine/jasmine/issues/1316) from @rachelcarmena
* Throw a recognizable Error message when `fail` outside of a spec.
- Fixes [#1017](https://github.com/jasmine/jasmine/issues/1017)
* Allow the matcher provide a custom error message
- Merges [#1298](https://github.com/jasmine/jasmine/issues/1298) from @deckar01
- Fixes [#1123](https://github.com/jasmine/jasmine/issues/1123)
* Fix the order in which afterAll hooks are run to match afterEach
- Merges [#1312](https://github.com/jasmine/jasmine/issues/1312) from @gdborton
- Fixes [#1311](https://github.com/jasmine/jasmine/issues/1311)
* Add matchers for positive and negative infinity
- Merges [#1300](https://github.com/jasmine/jasmine/issues/1300) from @toubou91
- Fixes [#1294](https://github.com/jasmine/jasmine/issues/1294)
* Add a first pass at JSDocs for the intended public API
- Fixes [#596](https://github.com/jasmine/jasmine/issues/596)
* Pretty print objects passed to fail method
- Merges [#1283](https://github.com/jasmine/jasmine/issues/1283) from @mmmichl
- Fixes [#1090](https://github.com/jasmine/jasmine/issues/1090)
* Properly check for Error constructor from a different frame
- Merges [#1275](https://github.com/jasmine/jasmine/issues/1275) from @anseki
- Fixes [#1252](https://github.com/jasmine/jasmine/issues/1252)
* Add toHaveBeenCalledBefore matcher
- Merges [#1242](https://github.com/jasmine/jasmine/issues/1242) from @DamienCassou
* Collect unhandled exceptions and pass them to the current runnable
- Fixes [#529](https://github.com/jasmine/jasmine/issues/529)
- Fixes [#937](https://github.com/jasmine/jasmine/issues/937)
* Nicer error messages for `spyOn` when `null` is provided
- Fixes [#1258](https://github.com/jasmine/jasmine/issues/1258)
* Require arguments to beforeEach, it, etc, to be actual functions
- Merges [#1222](https://github.com/jasmine/jasmine/issues/1222) from @voithos
- Fixes [#1004](https://github.com/jasmine/jasmine/issues/1004)
* Update MIT.LICENSE for new year
- Merges [#1249](https://github.com/jasmine/jasmine/issues/1249) from @Scottkao85
* Update README.md for new year
- Merges [#1248](https://github.com/jasmine/jasmine/issues/1248) from @Nebojsaa
* Remove unused `message` param from Suite#pend
- See [#1132](https://github.com/jasmine/jasmine/issues/1132)
* Fix bug where before/afterAll were being executed in disabled suites.
- Merges [#1225](https://github.com/jasmine/jasmine/issues/1225) from @voithos
- Fixes [#1175](https://github.com/jasmine/jasmine/issues/1175)
* Make toEqual matcher report the difference between objects
- Merges [#1163](https://github.com/jasmine/jasmine/issues/1163) from @benchristel
- Fixes [#675](https://github.com/jasmine/jasmine/issues/675)
- Merges [#1236](https://github.com/jasmine/jasmine/issues/1236) from @benchristel
* Implement spies for get/set functions on accessor properties
- Merges [#1203](https://github.com/jasmine/jasmine/issues/1203) from @celluj34
- Merges [#1008](https://github.com/jasmine/jasmine/issues/1008) from @smacker
- Fixes [#943](https://github.com/jasmine/jasmine/issues/943)
* When the HtmlReporter has a 'spec' query param, the spec list only shows matching specs/suites
- Merges [#1046](https://github.com/jasmine/jasmine/issues/1046) from @d-reinhold
- Fixes [#510](https://github.com/jasmine/jasmine/issues/510)
* createSpyObj may use object for method/response shorthand
- Merges [#1101](https://github.com/jasmine/jasmine/issues/1101) from @mbildner
* Separate clear stack and run it after each spec
- Fixes [#985](https://github.com/jasmine/jasmine/issues/985)
- Fixes [#945](https://github.com/jasmine/jasmine/issues/945)
- Fixes [#366](https://github.com/jasmine/jasmine/issues/366)
* Now spies preserve original function arity
- Merges [#1055](https://github.com/jasmine/jasmine/issues/1055) from @kapke
- Fixes [#991](https://github.com/jasmine/jasmine/issues/991)
* Added support for ES6 sets to toContain and toEqual.
- Merges [#1067](https://github.com/jasmine/jasmine/issues/1067) from @alur
* Correctly pretty print objects from other contexts (e.g. iframes) and which do not override toString
- Merges [#1091](https://github.com/jasmine/jasmine/issues/1091) from @thatfulvioguy
- Fixes [#1087](https://github.com/jasmine/jasmine/issues/1087)
* Pass custom testers to asymmetric testers
- Merges [#1139](https://github.com/jasmine/jasmine/issues/1139) from @joeyparrish
- Fixes [#1138](https://github.com/jasmine/jasmine/issues/1138)
* Fix bad url in README
- Merges [#1215](https://github.com/jasmine/jasmine/issues/1215) from @mattc41190
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

31
release_notes/2.6.1.md Normal file
View File

@@ -0,0 +1,31 @@
# Jasmine 2.6.1 Release Notes
## Summary
This is a patch release to fix some regressions in the 2.6.0 release
## Pull Requests & Issues
* Update README.md to make installation instructions more version-agnostic
- Merges #1319 from @reinrl
* Check for `process.listeners` as well, for GlobalErrors
- Fixes #1333
* allow explicit undefined as function for `it` and `xit`
- Merges #1329 from @UziTech
- Fixes #1328
* remove eval to create spy wrapper
- Merges #1330 from @UziTech
- Fixes #1325
* iterate through keys with a regular for loop
- Merges #1326 from @seanparmelee
- Fixes #1321
- Fixes #1324
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

23
release_notes/2.6.2.md Normal file
View File

@@ -0,0 +1,23 @@
# Jasmine 2.6.2 Release Notes
## Summary
This is a patch release to fix some regressions and performance problems in the 2.6.0 release
## Changes
* Clear the stack if onmessage is called before the previous invocation finishes
- Fixes #1327
- Fixes jasmine/gulp-jasmine-browser#48
* Correctly route errors that occur while a QueueRunner is clearing stack
- Merges #1352 from @sgravrock
- Fixes #1344
- Fixes #1349
* Don't mask errors that occur when no handlers are installed
- Merges #1347 from @sgravrock
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

17
release_notes/2.6.3.md Normal file
View File

@@ -0,0 +1,17 @@
# Jasmine 2.6.3 Release Notes
## Summary
This is a patch release to fix some regressions and performance problems in the 2.6.0 release
## Changes
* Make sure the queue runner goes async for async specs
- Fixes [#1327](https://github.com/jasmine/jasmine/issues/1327)
- Fixes [#1334](https://github.com/jasmine/jasmine/issues/1334)
- Fixes [jasmine/gulp-jasmine-browser#48](https://github.com/jasmine/gulp-jasmine-browser/issues/48)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

17
release_notes/2.6.4.md Normal file
View File

@@ -0,0 +1,17 @@
# Jasmine 2.6.4 Release Notes
## Summary
This is a patch release to fix some regressions and performance problems in the 2.6.0 release
## Changes
* Break into a `setTimeout` every once in a while allowing the CPU to run other things that used the real `setTimeout`
- Fixes [#1327](https://github.com/jasmine/jasmine/issues/1327)
- See [#1334](https://github.com/jasmine/jasmine/issues/1334)
- Fixes [jasmine/gulp-jasmine-browser#48](https://github.com/jasmine/gulp-jasmine-browser/issues/48)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

61
release_notes/2.7.0.md Normal file
View File

@@ -0,0 +1,61 @@
# Jasmine 2.7.0 Release Notes
## Summary
This release contains a number of fixes and pull requests.
## Pull Requests & Issues
* Add class UserContext
- Merges [#1400](https://github.com/jasmine/jasmine/issues/1400) from @darthjee
* Send unfocused tests through the same queue as focused tests
- Merges [#1399](https://github.com/jasmine/jasmine/issues/1399) from @jberney
* PrettyPrinter allows an object to have a `toString` that isn't a function
- Fixes [#1389](https://github.com/jasmine/jasmine/issues/1389)
* Fix rounding in toBeCloseTo
- Fixes [#1382](https://github.com/jasmine/jasmine/issues/1382)
* When stop on failure is enabled, skip subsequent it() and beforeEach(). Note: afterEach() functions are still run, because skipping them is highly likely to pollute specs that run after the failure.
- Fixes [#577](https://github.com/jasmine/jasmine/issues/577)
- Fixes [#807](https://github.com/jasmine/jasmine/issues/807)
* Only clear out the `spec` param for Run all link
- Fixes [#1369](https://github.com/jasmine/jasmine/issues/1369)
* Pretty printer will now use MAX_PRETTY_PRINT_ARRAY_LENGTH for objects
- Fixes [#1291](https://github.com/jasmine/jasmine/issues/1291)
- Fixes [#1360](https://github.com/jasmine/jasmine/issues/1360)
* updated package glob from 7.0.5 to 7.1.2
- Merges [#1368](https://github.com/jasmine/jasmine/issues/1368) from @EsrefDurna
* Fix bower.json url to be https instead of http
- Merges [#1365](https://github.com/jasmine/jasmine/issues/1365) from @kant
* Fail when one of the arguments passed into toBeCloseTo matcher is null
- Merges [#1362](https://github.com/jasmine/jasmine/issues/1362) from @beatrichartz
* Fixed HTML snippet in README
- Closes [#1366](https://github.com/jasmine/jasmine/issues/1366).
* Report the random seed at the beginning and end of execution. This allows reporters to provide the seed to the user even in cases where Jasmine crashes before completing.
- Merges [#1348](https://github.com/jasmine/jasmine/issues/1348) from @sgravrock
* Add ES6 map support to Jasmine
- Merges [#1340](https://github.com/jasmine/jasmine/issues/1340) from @rmehlinger
- Fixes [#1257](https://github.com/jasmine/jasmine/issues/1257)
* Added support for async before/it/after functions that return promises and added support for ES2017 async functions
- Merges [#1356](https://github.com/jasmine/jasmine/issues/1356) from @sgravrock
- Fixes [#1336](https://github.com/jasmine/jasmine/issues/1336)
- Fixes [#1270](https://github.com/jasmine/jasmine/issues/1270)
- Fixes [#1350](https://github.com/jasmine/jasmine/issues/1350)
- Fixes [#1320](https://github.com/jasmine/jasmine/issues/1320)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

52
release_notes/2.8.0.md Normal file
View File

@@ -0,0 +1,52 @@
# Jasmine 2.8.0 Release Notes
## Summary
This release contains a number of fixes and pull requests.
2.8 should be the last 2.x release of Jasmine, as we aim for 3.0.
## Changes
* Create CODE_OF_CONDUCT.md
* Add jsdocs for reporter events
* Update jsApiReporter docs to link to new suite and spec results
* Add explicit docs for the callback function passed to `it` etc.
* Update afterAll documentation
## Pull Requests & Issues
* Add 'nothing' matcher and tests
- Merges [#1412](https://github.com/jasmine/jasmine/issues/1412) from @ksvitkovsky
- Fixes [#1221](https://github.com/jasmine/jasmine/issues/1221)
* Make toEqual matcher report the difference between array elements when arrays have different length
- Closes [#1375](https://github.com/jasmine/jasmine/issues/1375) from @kiewic
* Add arrayWithExactContents asymmetric matcher
- Fixes [#817](https://github.com/jasmine/jasmine/issues/817)
* Ensure no message added on asym. match success
- Closes [#1408](https://github.com/jasmine/jasmine/issues/1408) from @ksvitkovsky
- Fixes [#1388](https://github.com/jasmine/jasmine/issues/1388)
* Better primitives detection for saveArgsByValue
- Closes [#1407](https://github.com/jasmine/jasmine/issues/1407) from @ksvitkovsky
- Fixes [#1403](https://github.com/jasmine/jasmine/issues/1403)
* Better pretty printing for typed arrays
- Closes [#1404](https://github.com/jasmine/jasmine/issues/1404) from @ksvitkovsky
- Fixes [#1180](https://github.com/jasmine/jasmine/issues/1180)
* Rewrite ES6 Set and Map comparison to ignore insertion order
- Merges [#1406](https://github.com/jasmine/jasmine/issues/1406) from @theefer
- Fixes [#1402](https://github.com/jasmine/jasmine/issues/1402)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

99
release_notes/2.9.0.md Normal file
View File

@@ -0,0 +1,99 @@
# Jasmine 2.9 Release Notes
## Summary
This release contains a number of fixes and pull requests.
## Changes
* Fixed DelayedFunctionScheduler IE 8 compatibility issue
* Fixed SPEC HAS NO EXPECTATIONS warning in HTML reporter
* Correctly remove spies of window.onerror on IE
* Truncate pretty printer output that is more than j$.MAX_PRETTY_PRINT_CHARS long
* Reduced pretty printer limits to much smaller values
* Update contributing for new naming of `jasmineUnderTest`
* Allowed async functions to be passed into spy#callFake
## Pull Requests & Issues
* Added complete support for Set also for IE11.
- Merges [#1478](https://github.com/jasmine/jasmine/issues/1478) from @Volox
- Fixes [#1355](https://github.com/jasmine/jasmine/issues/1355)
* Added complete support for Map also for IE11.
- Merges [#1477](https://github.com/jasmine/jasmine/issues/1477) from @Volox
- Fixes [#1472](https://github.com/jasmine/jasmine/issues/1472)
* Use timeout objects when in node
- Merges [#1470](https://github.com/jasmine/jasmine/issues/1470) from @chris--young
- Fixes [#1469](https://github.com/jasmine/jasmine/issues/1469)
* Fixed `pending()` for `async`/promise-returning specs
- Fixes [#1449](https://github.com/jasmine/jasmine/issues/1449)
- Fixes [#1450](https://github.com/jasmine/jasmine/issues/1450)
* Added test steps for other major node versions
- Merges [#1448](https://github.com/jasmine/jasmine/issues/1448) from @mrlannigan
* Fix equality computation for ES6 Sets.
- Merges [#1445](https://github.com/jasmine/jasmine/issues/1445) from @b-3-n
- Fixes [#1444](https://github.com/jasmine/jasmine/issues/1444)
* Add instruction to sync local master with upstream
- Merges [#1440](https://github.com/jasmine/jasmine/issues/1440) from aaronang
* Add some unit tests that exercise jasmine.anything() and Map matching.
- Merges [#1437](https://github.com/jasmine/jasmine/issues/1437) from @voithos
* Add special handling of asymmetric matcher objects as keys in Maps.
- Merges [#1436](https://github.com/jasmine/jasmine/issues/1436) from @voithos
- Fixes [#1432](https://github.com/jasmine/jasmine/issues/1432)
* Add support for jasmine.any(Symbol).
- Merge [#1435](https://github.com/jasmine/jasmine/issues/1435) from @voithos
- Fixes [#1431](https://github.com/jasmine/jasmine/issues/1431)
* Throw an error for invalid nesting of a suite functions
- Merges [#1411](https://github.com/jasmine/jasmine/issues/1411) from @ksvitkovsky
- Fixes [#1295](https://github.com/jasmine/jasmine/issues/1295)
* Deep clone args before passing them to reporters
- Merges [#1424](https://github.com/jasmine/jasmine/issues/1424) from @aj-dev
* Fix "Before Committing" section of CONTRIBUTING.md.
- Merges [#1429](https://github.com/jasmine/jasmine/issues/1429) from @voithos
* Fix lint warning in CallTracker.
- Merges [#1428](https://github.com/jasmine/jasmine/issues/1428) from @voithos
* clearTimeout should now correctly clear a timeout that is also scheduled to run at the same tick.
- Merges [#1427](https://github.com/jasmine/jasmine/issues/1427) from @leahciMic
- Fixes [#1426](https://github.com/jasmine/jasmine/issues/1426)
* Add a note about `defineProperty` for `spyOnProperty`
- Fixes [#1415](https://github.com/jasmine/jasmine/issues/1415)
* Add Promise checking to eq
- Merges [#1386](https://github.com/jasmine/jasmine/issues/1386) from @sderickson
- Fixes [#1314](https://github.com/jasmine/jasmine/issues/1314)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

15
release_notes/2.9.1.md Normal file
View File

@@ -0,0 +1,15 @@
# Jasmine Core 2.9.1 Release Notes
## Summary
This is a hotfix release to fix a breaking change from the 2.9.0 release
## Changes
* Clear timeouts when starting to process a milli instead of at the end
- Fixes #1482
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

Some files were not shown because too many files have changed in this diff Show More