Steve Gravrock
ff0699035f
Merge branch 'main' into 7.0
2026-02-16 07:28:22 -08:00
Steve Gravrock
f12f4395f0
Redesigned moudule system
...
* Top level private APIs (e.g. jasmine.private.whatever) are no longer
exposed
* jasmineRequire is no longer exposed
* core is self-booting
* Globals are automatically created in browsers. (They can subsequently
be removed by user code if desired.)
* Globals are *not* automatically created in Node. An installGlobals
function is exported instead. The jasmine package calls installGlobals
unless configured not to do so.
* In Node, the same instance is returned each time jasmine-core is
imported. A reset function is exported. It effectively resets all state
by discarding the env and creating a new one. This allows mulitple
sequential runs within the same process to be independent of each
other, but does not allow multiple concurrent runs. (That probably never
worked anyway.)
Fixes #2094
2026-02-15 20:16:45 -08:00
Steve Gravrock
1d0718dc2f
Fix MAX_PRETTY_PRINT_CHARS default jsdoc in source code too
2026-01-19 14:58:15 -08:00
Steve Gravrock
f5e9b61f73
Replace isArray helper with native Array.isArray
2025-11-28 08:09:51 -08:00
Steve Gravrock
23894c1a0a
Detect monkey patching and emit a deprecation warning.
...
This isn't comprehensive but it should be broad enough to ensure that most
people who would be affected by blocking monkey patching see a warning.
Covers the jasmine namespace as well as classes that are monkey patched by
zone.js.
Replacing globals (describe/it/etc) doesn't trigger a warning because they
belong to the user and are expected to be replaced.
2025-11-27 07:23:57 -08:00
Steve Gravrock
a8431f33bd
Merge branch '5.99' into 6.0
2025-11-03 17:22:11 -08:00
Jonah Bron
75658e0566
jasmine.allOf AsymmetricEqualityTester
...
New asymmetric equality tester that accepts a variable number of arguments, and will pass if all of them evaluate as being equal to the input value.
Includes unit tests
2025-10-27 10:10:16 -07:00
Steve Gravrock
68a7cbb991
Adopt strict mode throughout the codebase
2025-10-05 06:53:54 -07:00
Steve Gravrock
168ff0a751
Move private APIs to private namespace
...
Fixes #2078
2025-09-27 13:21:09 -07:00
Steve Gravrock
970cbdc69c
Omit irrelevant properties from specStarted
2025-09-21 15:09:38 -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
3d54184c7f
Docs: Improved discoverability of asymmetric equality testers
2024-07-03 10:17:57 -07:00
Steve Gravrock
4984548cab
Clarify argument to spyOnGlobalErrorsAsync's spy
2024-03-22 08:53:19 -07:00
Steve Gravrock
1624b07589
Clarify spyOnGlobalErrorsAsync API docs
2024-03-04 19:35:24 -08: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
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
41f7fabe2f
Renamed jasmine.exactly to jasmine.is, for similarity with toBe
2022-05-21 08:30:53 -07:00
Steve Gravrock
0c87d47318
Added a jasmine.exactly asymmetric equality tester
2022-05-14 17:01:38 -07: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
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
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
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
1332f01ca4
Merge branch '3.99' into 4.0
2021-09-23 16:08:44 -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
c73df57720
MatchersUtil#contains uses deep equality rather than === for set members
...
[#169001712 ]
2021-07-24 14:23:05 -07:00
Steve Gravrock
fe0a83ba87
Removed support for Internet Explorer
2021-07-23 21:46:15 -07:00
Steve Gravrock
a27280e9e7
Merge branch '3.99' into 4.0
2021-07-20 17:55:18 -07:00
Steve Gravrock
c1d1d69be2
Fixed test failures in Chrome and Edge
2021-07-19 12:08:40 -07:00
Steve Gravrock
9b3d4a2bf2
Merge branch '3.99' into 4.0
2021-07-10 09:13:28 -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
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
c2a714f168
Removed support for IE 10 and Safari 8
2021-04-23 08:14:19 -07:00
Steve Gravrock
58ef707bc6
Added jasmine.isSpy to the public interface
...
* Fixes #1880
2021-03-17 17:58:51 -07:00
Steve Gravrock
89331bb1bb
Fixed comparison between URL objects
...
* Fixes #1866
2020-11-21 13:47:44 -08: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
8991b1bba3
Fixed toHaveSize matcher on IE 10 & 11
2020-04-12 21:22:14 -07: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
Steve Gravrock
ba4a8d1d00
Fixed jsdocs
2019-09-10 11:23:11 -07:00
Olga Kozlova
b01d86840a
mapContaining and setContaining asymmetric matchers
2019-08-03 22:14:48 +03: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
b4cbe9850f
add prettier and eslint
2019-05-21 18:23:48 -07:00