Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d745d6b5f0 | |||
| fc2c2a477d | |||
| ff93277c0f | |||
| 90741b3cee | |||
| d1de59f0ed |
@@ -530,14 +530,13 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
if (noExpectations(resultNode.result)) {
|
if (noExpectations(resultNode.result)) {
|
||||||
specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
|
specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
|
||||||
}
|
}
|
||||||
if (
|
if (resultNode.result.status === 'pending') {
|
||||||
resultNode.result.status === 'pending' &&
|
if (resultNode.result.pendingReason !== '') {
|
||||||
resultNode.result.pendingReason !== ''
|
specDescription +=
|
||||||
) {
|
' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;
|
||||||
specDescription =
|
} else {
|
||||||
specDescription +
|
specDescription += ' PENDING';
|
||||||
' PENDING WITH MESSAGE: ' +
|
}
|
||||||
resultNode.result.pendingReason;
|
|
||||||
}
|
}
|
||||||
specListNode.appendChild(
|
specListNode.appendChild(
|
||||||
createDom(
|
createDom(
|
||||||
|
|||||||
@@ -55,9 +55,6 @@ body {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
right: 100%;
|
right: 100%;
|
||||||
}
|
}
|
||||||
.jasmine_html-reporter .jasmine-version {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
.jasmine_html-reporter .jasmine-banner {
|
.jasmine_html-reporter .jasmine-banner {
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
}
|
}
|
||||||
@@ -169,10 +166,11 @@ body {
|
|||||||
}
|
}
|
||||||
.jasmine_html-reporter .jasmine-bar.jasmine-menu {
|
.jasmine_html-reporter .jasmine-bar.jasmine-menu {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #aaa;
|
color: #000;
|
||||||
}
|
}
|
||||||
.jasmine_html-reporter .jasmine-bar.jasmine-menu a {
|
.jasmine_html-reporter .jasmine-bar.jasmine-menu a {
|
||||||
color: #333;
|
color: blue;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.jasmine_html-reporter .jasmine-bar a {
|
.jasmine_html-reporter .jasmine-bar a {
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
@@ -10713,5 +10713,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getJasmineRequireObj().version = function() {
|
getJasmineRequireObj().version = function() {
|
||||||
return '5.0.0-beta.0';
|
return '5.0.0';
|
||||||
};
|
};
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "jasmine-core",
|
"name": "jasmine-core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "5.0.0-beta.0",
|
"version": "5.0.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/jasmine/jasmine.git"
|
"url": "https://github.com/jasmine/jasmine.git"
|
||||||
@@ -36,16 +36,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.36.0",
|
"eslint": "^8.36.0",
|
||||||
"eslint-plugin-compat": "^4.0.0",
|
"eslint-plugin-compat": "^4.0.0",
|
||||||
"glob": "^9.3.1",
|
"glob": "^10.2.3",
|
||||||
"grunt": "^1.0.4",
|
"grunt": "^1.0.4",
|
||||||
"grunt-cli": "^1.3.2",
|
"grunt-cli": "^1.3.2",
|
||||||
"grunt-contrib-compress": "^2.0.0",
|
"grunt-contrib-compress": "^2.0.0",
|
||||||
"grunt-contrib-concat": "^2.0.0",
|
"grunt-contrib-concat": "^2.0.0",
|
||||||
"grunt-css-url-embed": "^1.11.1",
|
"grunt-css-url-embed": "^1.11.1",
|
||||||
"grunt-sass": "^3.0.2",
|
"grunt-sass": "^3.0.2",
|
||||||
"jasmine": "github:jasmine/jasmine-npm#5.0",
|
"jasmine": "5.0.0-beta.0",
|
||||||
"jasmine-browser-runner": "^1.0.0",
|
"jasmine-browser-runner": "^1.0.0",
|
||||||
"jsdom": "^21.1.1",
|
"jsdom": "^22.0.0",
|
||||||
"load-grunt-tasks": "^5.1.0",
|
"load-grunt-tasks": "^5.1.0",
|
||||||
"prettier": "1.17.1",
|
"prettier": "1.17.1",
|
||||||
"sass": "^1.58.3",
|
"sass": "^1.58.3",
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# Jasmine Core 5.0.0 Release Notes
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
This is a major release that includes breaking changes. It primarily adds
|
||||||
|
support for parallel execution in Node via the `jasmine` package. Most users
|
||||||
|
should be able to upgrade without changes, but please read the list of breaking
|
||||||
|
changes below and see the [migration guide](https://jasmine.github.io/tutorials/upgrading_to_Jasmine_5.0)
|
||||||
|
for more information.
|
||||||
|
|
||||||
|
## Breaking changes
|
||||||
|
|
||||||
|
* Dropped support for Node 12, 14, and 16
|
||||||
|
* Dropped support for Safari 14 and Firefox 91
|
||||||
|
* Made Env#execute async and removed the callback parameter
|
||||||
|
* Global errors are detected via addEventListener rather than setting window.onerror
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
## New features
|
||||||
|
|
||||||
|
* Support for parallel execution in Node via the `jasmine` package
|
||||||
|
See the [parallel guide](https://jasmine.github.io/tutorials/running_specs_in_parallel)
|
||||||
|
for more information.
|
||||||
|
* Added Node 20 to supported environments
|
||||||
|
|
||||||
|
## Bug fixes
|
||||||
|
|
||||||
|
* Accessibility: Always provide a non-color indication that a spec is pending
|
||||||
|
* Accessibility: Improved contrast of version number and inactive tab links
|
||||||
|
* Uninstall the global error handler at the end of env execution
|
||||||
|
|
||||||
|
## Internal improvements
|
||||||
|
|
||||||
|
* Updated dev dependencies
|
||||||
|
* Dogfood parallel execution feature in CI
|
||||||
|
|
||||||
|
## Supported environments
|
||||||
|
|
||||||
|
jasmine-core 5.0.0 has been tested in the following environments.
|
||||||
|
|
||||||
|
| Environment | Supported versions |
|
||||||
|
|-------------------|--------------------|
|
||||||
|
| Node | 18, 20 |
|
||||||
|
| Safari | 15-16 |
|
||||||
|
| Chrome | 113 |
|
||||||
|
| Firefox | 102, 113 |
|
||||||
|
| Edge | 113 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
||||||
@@ -1411,6 +1411,23 @@ describe('HtmlReporter', function() {
|
|||||||
describe('and there are pending specs', function() {
|
describe('and there are pending specs', function() {
|
||||||
let container, reporter;
|
let container, reporter;
|
||||||
|
|
||||||
|
function pendingSpecStatus() {
|
||||||
|
return {
|
||||||
|
id: 123,
|
||||||
|
description: 'with a spec',
|
||||||
|
fullName: 'A Suite with a spec',
|
||||||
|
status: 'pending',
|
||||||
|
passedExpectations: [],
|
||||||
|
failedExpectations: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function reportWithSpecStatus(specStatus) {
|
||||||
|
reporter.specStarted(specStatus);
|
||||||
|
reporter.specDone(specStatus);
|
||||||
|
reporter.jasmineDone({});
|
||||||
|
}
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
container = document.createElement('div');
|
container = document.createElement('div');
|
||||||
const getContainer = function() {
|
const getContainer = function() {
|
||||||
@@ -1429,21 +1446,10 @@ describe('HtmlReporter', function() {
|
|||||||
reporter.initialize();
|
reporter.initialize();
|
||||||
|
|
||||||
reporter.jasmineStarted({ totalSpecsDefined: 1 });
|
reporter.jasmineStarted({ totalSpecsDefined: 1 });
|
||||||
const specStatus = {
|
|
||||||
id: 123,
|
|
||||||
description: 'with a spec',
|
|
||||||
fullName: 'A Suite with a spec',
|
|
||||||
status: 'pending',
|
|
||||||
passedExpectations: [],
|
|
||||||
failedExpectations: [],
|
|
||||||
pendingReason: 'my custom pending reason'
|
|
||||||
};
|
|
||||||
reporter.specStarted(specStatus);
|
|
||||||
reporter.specDone(specStatus);
|
|
||||||
reporter.jasmineDone({});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('reports the pending specs count', function() {
|
it('reports the pending specs count', function() {
|
||||||
|
reportWithSpecStatus(pendingSpecStatus());
|
||||||
const alertBar = container.querySelector('.jasmine-alert .jasmine-bar');
|
const alertBar = container.querySelector('.jasmine-alert .jasmine-bar');
|
||||||
|
|
||||||
expect(alertBar.innerHTML).toMatch(
|
expect(alertBar.innerHTML).toMatch(
|
||||||
@@ -1452,17 +1458,36 @@ describe('HtmlReporter', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('reports no failure details', function() {
|
it('reports no failure details', function() {
|
||||||
|
reportWithSpecStatus(pendingSpecStatus());
|
||||||
const specFailure = container.querySelector('.jasmine-failures');
|
const specFailure = container.querySelector('.jasmine-failures');
|
||||||
|
|
||||||
expect(specFailure.childNodes.length).toEqual(0);
|
expect(specFailure.childNodes.length).toEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('displays the custom pending reason', function() {
|
it('displays the custom pending reason', function() {
|
||||||
|
reportWithSpecStatus({
|
||||||
|
...pendingSpecStatus(),
|
||||||
|
pendingReason: 'my custom pending reason'
|
||||||
|
});
|
||||||
const pendingDetails = container.querySelector(
|
const pendingDetails = container.querySelector(
|
||||||
'.jasmine-summary .jasmine-pending'
|
'.jasmine-summary .jasmine-pending'
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(pendingDetails.innerHTML).toContain('my custom pending reason');
|
expect(pendingDetails.innerHTML).toContain(
|
||||||
|
'PENDING WITH MESSAGE: my custom pending reason'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('indicates that the spec is pending even if there is no reason', function() {
|
||||||
|
reportWithSpecStatus({
|
||||||
|
...pendingSpecStatus(),
|
||||||
|
pendingReason: ''
|
||||||
|
});
|
||||||
|
const pendingDetails = container.querySelector(
|
||||||
|
'.jasmine-summary .jasmine-pending'
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(pendingDetails.innerHTML).toContain('PENDING');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -498,14 +498,13 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
if (noExpectations(resultNode.result)) {
|
if (noExpectations(resultNode.result)) {
|
||||||
specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
|
specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
|
||||||
}
|
}
|
||||||
if (
|
if (resultNode.result.status === 'pending') {
|
||||||
resultNode.result.status === 'pending' &&
|
if (resultNode.result.pendingReason !== '') {
|
||||||
resultNode.result.pendingReason !== ''
|
specDescription +=
|
||||||
) {
|
' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;
|
||||||
specDescription =
|
} else {
|
||||||
specDescription +
|
specDescription += ' PENDING';
|
||||||
' PENDING WITH MESSAGE: ' +
|
}
|
||||||
resultNode.result.pendingReason;
|
|
||||||
}
|
}
|
||||||
specListNode.appendChild(
|
specListNode.appendChild(
|
||||||
createDom(
|
createDom(
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
$line-height: 14px;
|
$line-height: 14px;
|
||||||
$margin-unit: 14px;
|
$margin-unit: 14px;
|
||||||
|
|
||||||
$faint-text-color: #aaa;
|
|
||||||
$light-text-color: #666;
|
$light-text-color: #666;
|
||||||
$text-color: #333;
|
$text-color: #333;
|
||||||
|
$inactive-tab-text-color: blue;
|
||||||
|
$active-tab-text-color: #000;
|
||||||
|
|
||||||
$page-background-color: #eee;
|
$page-background-color: #eee;
|
||||||
|
$menu-background-color: #aaa;
|
||||||
|
|
||||||
$passing-color: #007069;
|
$passing-color: #007069;
|
||||||
$failing-color: #ca3a11;
|
$failing-color: #ca3a11;
|
||||||
@@ -91,10 +93,6 @@ body {
|
|||||||
right: 100%;
|
right: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jasmine-version {
|
|
||||||
color: $faint-text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--- Banner ---//
|
//--- Banner ---//
|
||||||
|
|
||||||
.jasmine-banner {
|
.jasmine-banner {
|
||||||
@@ -238,10 +236,11 @@ body {
|
|||||||
|
|
||||||
&.jasmine-menu {
|
&.jasmine-menu {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: $faint-text-color;
|
color: $active-tab-text-color;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $text-color;
|
color: $inactive-tab-text-color;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user