Skip to content

Commit b13efed

Browse files
committed
reset evil flag in replicator test
1 parent be46059 commit b13efed

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

test/functional/fixtures/api/es-next/iframe-switching/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ describe('[API] t.switchToIframe(), t.switchToMainWindow()', function () {
7676

7777
it('Should work in an iframe with the srcdoc attribute', function () {
7878
return runTests('./testcafe-fixtures/iframe-switching-test.js', 'Click in an iframe with the srcdoc attribute', {
79+
// NOTE: temporarily added to known issues list
7980
skip: 'firefox-osx',
8081
...DEFAULT_RUN_OPTIONS,
8182
});

test/server/helpers/gh-16.js renamed to test/server/helpers/replicator-tests-helper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
// Regression test helper for GH-16 (RCE via TypedArray deserialization)
3+
// Replicator regression test helper for RCE via TypedArray deserialization (GH-16 in replicator repo).
44

55
const TICK_COUNT = 3;
66

@@ -48,3 +48,7 @@ module.exports.checkIfBroken = function () {
4848
return !!global.evilFlag;
4949
});
5050
};
51+
52+
module.exports.resetEvilFlag = function () {
53+
global.evilFlag = false;
54+
};

test/server/replicator-test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
const assert = require('assert');
66
const Replicator = require('../../lib/utils/replicator');
7-
const helpersGH16 = require('./helpers/gh-16');
7+
const helpersGH16 = require('./helpers/replicator-tests-helper');
88

99
describe('Replicator', function () {
1010
it('Should add and remove transforms', function () {
@@ -430,7 +430,8 @@ describe('Replicator', function () {
430430
return helpersGH16.checkIfBroken()
431431
.then(function (result) {
432432
assert.strictEqual(result, false);
433-
});
433+
})
434+
.then(helpersGH16.resetEvilFlag);
434435
});
435436
});
436437
});

0 commit comments

Comments
 (0)