55 * that can be found in the LICENSE file in the root of the source
66 * tree.
77 */
8- /* eslint-env node, mocha */
8+ /* eslint-env node */
99
1010'use strict' ;
1111const webdriver = require ( 'selenium-webdriver' ) ;
1212const seleniumHelpers = require ( '../../../../../test/webdriver' ) ;
13- const { expect} = require ( 'chai' ) ;
1413
1514let driver ;
1615const path = '/src/content/datachannel/channel/index.html' ;
1716const url = `${ process . env . BASEURL ? process . env . BASEURL : ( 'file://' + process . cwd ( ) ) } ${ path } ` ;
1817
1918describe ( 'datachannel and broadcast channels' , ( ) => {
20- before ( ( ) => {
19+ beforeAll ( ( ) => {
2120 driver = seleniumHelpers . buildDriver ( ) ;
2221 } ) ;
23- after ( ( ) => {
22+ afterAll ( ( ) => {
2423 return driver . quit ( ) ;
2524 } ) ;
2625
@@ -68,7 +67,7 @@ describe('datachannel and broadcast channels', () => {
6867 return document . getElementById ( 'dataChannelReceive' ) . value . length > 0 ;
6968 } ) ) ;
7069 const fromFirst = await driver . findElement ( webdriver . By . id ( 'dataChannelReceive' ) ) . getAttribute ( 'value' ) ;
71- expect ( fromFirst ) . to . equal ( firstHello ) ;
70+ expect ( fromFirst ) . toBe ( firstHello ) ;
7271
7372 // Send a message from the second tab to the first tab.
7473 await driver . switchTo ( ) . window ( secondTab ) ;
@@ -84,7 +83,7 @@ describe('datachannel and broadcast channels', () => {
8483 return document . getElementById ( 'dataChannelReceive' ) . value . length > 0 ;
8584 } ) ) ;
8685 const fromSecond = await driver . findElement ( webdriver . By . id ( 'dataChannelReceive' ) ) . getAttribute ( 'value' ) ;
87- expect ( fromSecond ) . to . equal ( secondHello ) ;
86+ expect ( fromSecond ) . toBe ( secondHello ) ;
8887 } ) ;
8988} ) ;
9089
0 commit comments