Skip to content

Commit cecc6e6

Browse files
authored
Merge pull request #1625 from fippo/fix-jest
Fix jest interop tests
2 parents 944f8bf + 80bddeb commit cecc6e6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/interop-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- run: BROWSER=${{matrix.browserA}} BVER=${{matrix.bver}} ./node_modules/travis-multirunner/setup.sh
1919
- run: BROWSER=${{matrix.browserB}} BVER=${{matrix.bver}} ./node_modules/travis-multirunner/setup.sh
2020
- run: Xvfb :99 &
21-
- run: BROWSER_A=${{matrix.browserA}} BROWSER_B=${{matrix.browserB}} BVER=${{matrix.bver}} DISPLAY=:99.0 node_modules/.bin/jest --retries=3 test/interop/connection.js
21+
- run: BROWSER_A=${{matrix.browserA}} BROWSER_B=${{matrix.browserB}} BVER=${{matrix.bver}} DISPLAY=:99.0 node_modules/.bin/jest --retries=3 test/interop/

test/interop/connection.js renamed to test/interop/connection.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const browserB = process.env.BROWSER_B || 'chrome';
1515
describe(`basic interop test ${browserA} => ${browserB}`, function() {
1616
let drivers;
1717
let clients;
18-
before(async () => {
18+
beforeAll(async () => {
1919
const options = {
2020
version: process.env.BVER || 'stable',
2121
browserLogging: true,
@@ -31,7 +31,7 @@ describe(`basic interop test ${browserA} => ${browserB}`, function() {
3131
};
3232
});
3333
});
34-
after(async () => {
34+
afterAll(async () => {
3535
await drivers.map(driver => driver.close());
3636
});
3737

@@ -52,5 +52,5 @@ describe(`basic interop test ${browserA} => ${browserB}`, function() {
5252

5353
await steps.step(drivers, (d) => steps.waitNVideosExist(d, 1), 'Video elements exist');
5454
await steps.step(drivers, steps.waitAllVideosHaveEnoughData, 'Video elements have enough data');
55-
}).timeout(30000);
56-
}).timeout(90000);;
55+
}, 30000);
56+
}, 90000);

test/webdriver.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (os.platform() === 'win32') {
1919
process.env.PATH += ':node_modules/.bin';
2020
}
2121

22-
function buildDriver(browser = process.env.BROWSER || 'chrome', options = {bver: process.env.BVER}) {
22+
function buildDriver(browser = process.env.BROWSER || 'chrome', options = {version: process.env.BVER}) {
2323
// Chrome options.
2424
const chromeOptions = new chrome.Options()
2525
.addArguments('allow-insecure-localhost')
@@ -66,7 +66,7 @@ function buildDriver(browser = process.env.BROWSER || 'chrome', options = {bver:
6666
}
6767

6868
const safariOptions = new safari.Options();
69-
safariOptions.setTechnologyPreview(options.bver === 'unstable');
69+
safariOptions.setTechnologyPreview(options.version === 'unstable');
7070

7171
// Firefox options.
7272
const firefoxOptions = new firefox.Options();

0 commit comments

Comments
 (0)