mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
* chore(tests): use a shared chrome instance for all browser tests * chore: format * chore: lint
26 lines
584 B
JavaScript
26 lines
584 B
JavaScript
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Hooks to run before the first test and after the last test.
|
|
* These create a shared chromedriver instance, so we don't have to fire up
|
|
* a new one for every suite.
|
|
*/
|
|
const {driverSetup, driverTeardown} = require('./test_setup');
|
|
|
|
const mochaHooks = {
|
|
async beforeAll() {
|
|
// Set a long timeout for startup.
|
|
this.timeout(10000);
|
|
return await driverSetup();
|
|
},
|
|
async afterAll() {
|
|
return await driverTeardown();
|
|
},
|
|
};
|
|
|
|
module.exports = {mochaHooks};
|