Files
blockly/tests/browser/test/hooks.js
Rachel Fenichel b5911c25de chore(tests): use a shared chrome instance for all browser tests (#7328)
* chore(tests): use a shared chrome instance for all browser tests

* chore: format

* chore: lint
2023-07-25 16:41:05 +00:00

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};