Skip to content

Commit

Permalink
Core: Remove support for PhantomJS
Browse files Browse the repository at this point in the history
Ref #1505.
  • Loading branch information
Krinkle committed May 29, 2024
1 parent 775c069 commit 96cfe19
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const localSessionStorage = (function () {
}());

// Basic fallback for ES6 Map
// Support: Safari 7, PhantomJS; Map is undefined
// Support: Safari 7; Map is undefined
// Support: iOS 8; `new Map(iterable)` is not supported
//
// Fallback for ES7 Map#keys
Expand Down
12 changes: 1 addition & 11 deletions src/html-reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -1068,17 +1068,7 @@ const stats = {
testItem.className = 'fail';
});

// Avoid readyState issue with phantomjs
// Ref: #818
const usingPhantom = (function (p) {
return (p && p.version && p.version.major > 0);
})(window.phantom);

if (usingPhantom) {
console.warn('Support for PhantomJS is deprecated and will be removed in QUnit 3.0.');
}

if (!usingPhantom && document.readyState === 'complete') {
if (document.readyState === 'complete') {
QUnit.autostart();
} else {
addEvent(window, 'load', QUnit.autostart);
Expand Down
3 changes: 0 additions & 3 deletions test/reorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ QUnit.test('Second', function (assert) {
assert.strictEqual(lastTest, '');
lastTest = 'Second';

// For some reason PhantomJS mutates config.reorder
QUnit.config.reorder = true;

// This test is "high priority" so it should execute before test "First"
// even though it is added to the queue late
// eslint-disable-next-line qunit/no-nested-tests
Expand Down

0 comments on commit 96cfe19

Please sign in to comment.