150 Commits

Author SHA1 Message Date
Steve Gravrock
434575f49d Use one declaration per statement
The old style of merging all of a function's variable declarations into
a single statement made some sense back in the days of var, but there's
no reason to keep doing it now that we use const and let.
2026-03-11 06:30:46 -07:00
Steve Gravrock
00b09a9a04 Simplify HtmlReporterV2 initialization and boot1.js 2025-11-28 09:47:31 -08:00
Steve Gravrock
b559faec2a HtmlReporterV2: show correct progress when running a subset of specs 2025-11-27 07:24:45 -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
3899d83fb6 HtmlReporterV2: show median and mean spec run time 2025-11-15 09:01:06 -08:00
Steve Gravrock
8f13684a01 Add a slowest specs list to HTMLReporterV2 2025-11-15 08:57:25 -08:00
Steve Gravrock
d31d33aeb3 Introduce a tab bar
This will make it easier to add a third tab to HtmlReporterV2.
2025-11-09 09:58:57 -08:00
Steve Gravrock
85322d1877 Re-add support for partial spec name filtering
No UI for this but users can construct URLs manually.
Fixes #2085.
2025-10-24 17:26:49 -07:00
Steve Gravrock
d66d0d9d2e Fixed standalone distribution 2025-10-18 12:31:48 -07:00
Steve Gravrock
ea882c2f1e HtmlReporterV2: Show a non-color indication of status while running 2025-10-18 09:46:16 -07:00
Steve Gravrock
695a805844 Backfill missing HTML reporter tests 2025-10-15 19:32:47 -07:00
Steve Gravrock
86387c9068 HtmlReporterV2: replace dots with progress bar 2025-10-09 16:42:42 -07:00
Steve Gravrock
9b3cc08818 Deprecate HtmlReporter and HtmlSpecFilter 2025-10-09 16:42:42 -07:00
Steve Gravrock
0ad54fc6f0 Clicking a link in HtmlReporterV2 does exact filtering 2025-10-09 16:42:42 -07:00
Steve Gravrock
c042665d9c HtmlReporterV2 doesn't need specStarted 2025-10-09 16:42:42 -07:00
Steve Gravrock
a457cf1b81 Simplify boot1.js 2025-10-09 16:42:42 -07:00
Steve Gravrock
fb814b5f94 Refactor HtmlReporterV2 test setup 2025-10-09 16:42:42 -07:00
Steve Gravrock
77c3b8b07e Clone HtmlSpecFilter and HtmlReporter in preparation for backward-incompatible changes 2025-10-09 16:42:42 -07:00
Steve Gravrock
de44e909f2 Ignore HtmlReporter's createElement and createTextNode options
Injected DOM wrappers were a nice idea in theory but everyone just passes
wrappers around document.createElement/document.createTextNode. That
includes HtmlReporter's unit tests and karma-jasmine-html-reporter, the
only known 5.x-compatible library that constructs an HtmlReporter.
2025-10-09 16:42:42 -07:00
Steve Gravrock
cfd8f11b30 Merge branch '5.99' into 6.0 2025-10-05 10:08:40 -07:00
Steve Gravrock
dbc1f9244e Revert "Clicking a link in the HTML reporter does exact filtering"
This change broke spec filtering in Karma by changing the format of the
`spec` query parameter. Although karma-jasmine-html-reporter uses
jasmine-core's HtmlSpecFilter, karm-jasmine provides its own spec filter
that interprets the query parameters itself.

This feature may be reintroduced in 6.0 as a breaking change.

This reverts commit 8309416cb2.
2025-10-05 09:59:36 -07:00
Steve Gravrock
489b83c61b Revert "Move knowledge of query parameters out of boot1.js"
This reverts commit 6715f24fd0.
2025-10-05 09:54:25 -07:00
Steve Gravrock
168ff0a751 Move private APIs to private namespace
Fixes #2078
2025-09-27 13:21:09 -07:00
Steve Gravrock
6715f24fd0 Move knowledge of query parameters out of boot1.js 2025-09-17 18:23:45 -07:00
Steve Gravrock
8309416cb2 Clicking a link in the HTML reporter does exact filtering
This feature requires an update to boot1.js, as shown in this commit.
Users with an older boot1.js will get the older inexact filtering.
2025-09-17 07:30:20 -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
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
Steve Gravrock
39f9c2e1a0 Don't attach spec helpers to the env 2023-08-26 11:52:26 -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
1166d10e43 Use const/let in specs, not var 2022-04-16 13:41:44 -07: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
42e6c45efa Allow use without creating globals
* Fixes #1235
2021-11-29 20:37:07 -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
6e10f22403 Don't display late errors as AfterAll errors in the HTML reporter 2021-09-11 08:57:50 -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
058e77b824 Merge branch 'main' into 3.99 2021-07-31 08:15:29 -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
fe0a83ba87 Removed support for Internet Explorer 2021-07-23 21:46:15 -07:00
Steve Gravrock
6cb9507f62 Merge branch 'main' into 3.99 2021-07-10 08:58:14 -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
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
f2de1be96a Fixed "stop spec on expectation failure" checkbox in standalone
Fixes [#178248968].
2021-06-01 08:49:34 -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
7d5ca27b9d Check for forgotten console and debugger statements 2020-09-17 13:33:25 -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
78c3a007ad Fixed test failure in Firefox 74 2020-04-11 12:08:49 -07:00