Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4f8669835 | ||
|
|
26be252e70 | ||
|
|
2a1b7a04f7 | ||
|
|
4c8a4f2b00 | ||
|
|
8bc95ae2e3 | ||
|
|
80b9d6c2e0 | ||
|
|
66ffb5f7a3 | ||
|
|
225194c343 | ||
|
|
7a75cc7643 | ||
|
|
ec7a9e2416 | ||
|
|
7896ae84e6 |
@@ -80,7 +80,7 @@ jobs:
|
||||
# cleanly if we kill it from a different step than it started in.
|
||||
|
||||
export PATH=$PATH:$HOME/workspace/bin
|
||||
export SAUCE_TUNNEL_IDENTIFIER=$CIRCLE_BUILD_NUM
|
||||
export SAUCE_TUNNEL_IDENTIFIER=$CIRCLE_WORKFLOW_JOB_ID
|
||||
scripts/start-sauce-connect sauce-pidfile
|
||||
set +o errexit
|
||||
scripts/run-all-browsers
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2023 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -58,4 +58,6 @@ To find out what environments work with a particular Jasmine release, see the [r
|
||||
* [Christian Williams](mailto:antixian666@gmail.com)
|
||||
* Sheel Choksi
|
||||
|
||||
Copyright (c) 2008-2022 Jasmine Maintainers. This software is licensed under the [MIT License](https://github.com/jasmine/jasmine/blob/main/MIT.LICENSE).
|
||||
Copyright (c) 2008-2019 Pivotal Labs<br>
|
||||
Copyright (c) 2008-2024 The Jasmine developers<br>
|
||||
This software is licensed under the [MIT License](https://github.com/jasmine/jasmine/blob/main/LICENSE).
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-<%= currentYear %> Pivotal Labs
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-<%= currentYear %> The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2023 Pivotal Labs
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2024 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2023 Pivotal Labs
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2024 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2023 Pivotal Labs
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2024 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
@@ -530,14 +531,13 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
if (noExpectations(resultNode.result)) {
|
||||
specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
|
||||
}
|
||||
if (
|
||||
resultNode.result.status === 'pending' &&
|
||||
resultNode.result.pendingReason !== ''
|
||||
) {
|
||||
specDescription =
|
||||
specDescription +
|
||||
' PENDING WITH MESSAGE: ' +
|
||||
resultNode.result.pendingReason;
|
||||
if (resultNode.result.status === 'pending') {
|
||||
if (resultNode.result.pendingReason !== '') {
|
||||
specDescription +=
|
||||
' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;
|
||||
} else {
|
||||
specDescription += ' PENDING';
|
||||
}
|
||||
}
|
||||
specListNode.appendChild(
|
||||
createDom(
|
||||
|
||||
@@ -55,9 +55,6 @@ body {
|
||||
position: fixed;
|
||||
right: 100%;
|
||||
}
|
||||
.jasmine_html-reporter .jasmine-version {
|
||||
color: #aaa;
|
||||
}
|
||||
.jasmine_html-reporter .jasmine-banner {
|
||||
margin-top: 14px;
|
||||
}
|
||||
@@ -169,10 +166,11 @@ body {
|
||||
}
|
||||
.jasmine_html-reporter .jasmine-bar.jasmine-menu {
|
||||
background-color: #fff;
|
||||
color: #aaa;
|
||||
color: #000;
|
||||
}
|
||||
.jasmine_html-reporter .jasmine-bar.jasmine-menu a {
|
||||
color: #333;
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.jasmine_html-reporter .jasmine-bar a {
|
||||
color: white;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2023 Pivotal Labs
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2024 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
@@ -2644,11 +2645,7 @@ getJasmineRequireObj().buildExpectationResult = function(j$) {
|
||||
} else if (options.stack) {
|
||||
error = options;
|
||||
} else {
|
||||
try {
|
||||
throw new Error(message());
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
error = new Error(message());
|
||||
}
|
||||
}
|
||||
// Omit the message from the stack trace because it will be
|
||||
@@ -3524,7 +3521,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
||||
lines.unshift(stackTrace.message);
|
||||
}
|
||||
|
||||
if (error.cause) {
|
||||
if (error.cause && error.cause instanceof Error) {
|
||||
const substack = this.stack_(error.cause, {
|
||||
messageHandling: 'require'
|
||||
});
|
||||
@@ -10484,5 +10481,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
||||
};
|
||||
|
||||
getJasmineRequireObj().version = function() {
|
||||
return '4.6.0';
|
||||
return '4.6.1';
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2023 Pivotal Labs
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2024 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jasmine-core",
|
||||
"license": "MIT",
|
||||
"version": "4.6.0",
|
||||
"version": "4.6.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jasmine/jasmine.git"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
run_browser() {
|
||||
browser=$1
|
||||
version=$2
|
||||
os="$3"
|
||||
description="$browser $version"
|
||||
if [ $version = "latest" ]; then
|
||||
version=""
|
||||
@@ -12,7 +13,7 @@ run_browser() {
|
||||
echo
|
||||
echo "Running $description"
|
||||
echo
|
||||
USE_SAUCE=true JASMINE_BROWSER=$browser SAUCE_BROWSER_VERSION=$version npm run ci
|
||||
USE_SAUCE=true JASMINE_BROWSER=$browser SAUCE_BROWSER_VERSION=$version SAUCE_OS="$os" npm run ci
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "PASS: $description" >> "$passfile"
|
||||
@@ -23,7 +24,17 @@ run_browser() {
|
||||
|
||||
passfile=`mktemp -t jasmine-results.XXXXXX` || exit 1
|
||||
failfile=`mktemp -t jasmine-results.XXXXXX` || exit 1
|
||||
run_browser chrome latest
|
||||
|
||||
# As of 2023-09-30, Sauce Connect doesn't work with the latest Chrome version
|
||||
# on the default Linux. Run on Mac OS instead. The OS specification may need to
|
||||
# be updated or removed when new Chrome versions stop being available on Mac OS
|
||||
# 12, although historically this has taken several major OS versions.
|
||||
# See <https://saucelabs.com/products/supported-browsers-devices>.
|
||||
# On Saucelabs, the test suite frequently runs ~30s slower on Mac OS than it
|
||||
# does on Linux, so it's probably worth removing the OS specification once Sauce
|
||||
# Connect works with Chrome latest on Linux again.
|
||||
run_browser chrome latest "macOS 12"
|
||||
|
||||
run_browser firefox latest
|
||||
run_browser firefox 102
|
||||
run_browser firefox 91
|
||||
|
||||
@@ -301,6 +301,26 @@ describe('ExceptionFormatter', function() {
|
||||
.withContext('first root cause stack frame')
|
||||
.toContain('ExceptionFormatterSpec.js');
|
||||
});
|
||||
|
||||
it('does not throw if cause is a non Error', function() {
|
||||
const formatter = new jasmineUnderTest.ExceptionFormatter();
|
||||
|
||||
expect(function() {
|
||||
formatter.stack(
|
||||
new Error('error', {
|
||||
cause: function() {}
|
||||
})
|
||||
);
|
||||
}).not.toThrowError();
|
||||
|
||||
expect(function() {
|
||||
formatter.stack(
|
||||
new Error('error', {
|
||||
cause: 'another error'
|
||||
})
|
||||
);
|
||||
}).not.toThrowError();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1411,6 +1411,23 @@ describe('HtmlReporter', function() {
|
||||
describe('and there are pending specs', function() {
|
||||
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() {
|
||||
container = document.createElement('div');
|
||||
const getContainer = function() {
|
||||
@@ -1429,21 +1446,10 @@ describe('HtmlReporter', function() {
|
||||
reporter.initialize();
|
||||
|
||||
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() {
|
||||
reportWithSpecStatus(pendingSpecStatus());
|
||||
const alertBar = container.querySelector('.jasmine-alert .jasmine-bar');
|
||||
|
||||
expect(alertBar.innerHTML).toMatch(
|
||||
@@ -1452,17 +1458,36 @@ describe('HtmlReporter', function() {
|
||||
});
|
||||
|
||||
it('reports no failure details', function() {
|
||||
reportWithSpecStatus(pendingSpecStatus());
|
||||
const specFailure = container.querySelector('.jasmine-failures');
|
||||
|
||||
expect(specFailure.childNodes.length).toEqual(0);
|
||||
});
|
||||
|
||||
it('displays the custom pending reason', function() {
|
||||
reportWithSpecStatus({
|
||||
...pendingSpecStatus(),
|
||||
pendingReason: 'my custom pending reason'
|
||||
});
|
||||
const pendingDetails = container.querySelector(
|
||||
'.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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
||||
lines.unshift(stackTrace.message);
|
||||
}
|
||||
|
||||
if (error.cause) {
|
||||
if (error.cause && error.cause instanceof Error) {
|
||||
const substack = this.stack_(error.cause, {
|
||||
messageHandling: 'require'
|
||||
});
|
||||
|
||||
@@ -69,11 +69,7 @@ getJasmineRequireObj().buildExpectationResult = function(j$) {
|
||||
} else if (options.stack) {
|
||||
error = options;
|
||||
} else {
|
||||
try {
|
||||
throw new Error(message());
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
error = new Error(message());
|
||||
}
|
||||
}
|
||||
// Omit the message from the stack trace because it will be
|
||||
|
||||
@@ -498,14 +498,13 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
if (noExpectations(resultNode.result)) {
|
||||
specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
|
||||
}
|
||||
if (
|
||||
resultNode.result.status === 'pending' &&
|
||||
resultNode.result.pendingReason !== ''
|
||||
) {
|
||||
specDescription =
|
||||
specDescription +
|
||||
' PENDING WITH MESSAGE: ' +
|
||||
resultNode.result.pendingReason;
|
||||
if (resultNode.result.status === 'pending') {
|
||||
if (resultNode.result.pendingReason !== '') {
|
||||
specDescription +=
|
||||
' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;
|
||||
} else {
|
||||
specDescription += ' PENDING';
|
||||
}
|
||||
}
|
||||
specListNode.appendChild(
|
||||
createDom(
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
$line-height: 14px;
|
||||
$margin-unit: 14px;
|
||||
|
||||
$faint-text-color: #aaa;
|
||||
$light-text-color: #666;
|
||||
$text-color: #333;
|
||||
$inactive-tab-text-color: blue;
|
||||
$active-tab-text-color: #000;
|
||||
|
||||
$page-background-color: #eee;
|
||||
$menu-background-color: #aaa;
|
||||
|
||||
$passing-color: #007069;
|
||||
$failing-color: #ca3a11;
|
||||
@@ -91,10 +93,6 @@ body {
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
.jasmine-version {
|
||||
color: $faint-text-color;
|
||||
}
|
||||
|
||||
//--- Banner ---//
|
||||
|
||||
.jasmine-banner {
|
||||
@@ -238,10 +236,11 @@ body {
|
||||
|
||||
&.jasmine-menu {
|
||||
background-color: #fff;
|
||||
color: $faint-text-color;
|
||||
color: $active-tab-text-color;
|
||||
|
||||
a {
|
||||
color: $text-color;
|
||||
color: $inactive-tab-text-color;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user