This commit is contained in:
Nathan Bierema 2021-06-19 15:59:10 -04:00
parent 7cdeb82da4
commit 18cf1bea35
5 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,4 @@
module.exports = { module.exports = {
setupFiles: ['<rootDir>/test/setup.js'], setupFilesAfterEnv: ['<rootDir>/test/setup.js'],
testPathIgnorePatterns: ['<rootDir>/examples'],
}; };

View File

@ -4,7 +4,7 @@ import chromedriver from 'chromedriver';
import { switchMonitorTests, delay } from '../utils/e2e'; import { switchMonitorTests, delay } from '../utils/e2e';
const port = 9515; const port = 9515;
const path = resolve('build/extension'); const path = resolve(__dirname, '..', '..', 'build', 'extension');
const extensionId = 'lmhkpmbekcpmknklioeibfkpmmfibljd'; const extensionId = 'lmhkpmbekcpmknklioeibfkpmmfibljd';
const actionsPattern = const actionsPattern =
/^@@INIT(.|\n)+@@reduxReactRouter\/routerDidChange(.|\n)+@@reduxReactRouter\/initRoutes(.|\n)+$/; /^@@INIT(.|\n)+@@reduxReactRouter\/routerDidChange(.|\n)+@@reduxReactRouter\/initRoutes(.|\n)+$/;
@ -17,7 +17,11 @@ describe('Chrome extension', function () {
.usingServer(`http://localhost:${port}`) .usingServer(`http://localhost:${port}`)
.withCapabilities({ .withCapabilities({
chromeOptions: { chromeOptions: {
args: ['--no-sandbox', `load-extension=${path}`], args: [
'--no-sandbox',
'--disable-dev-shm-usage',
`load-extension=${path}`,
],
}, },
}) })
.forBrowser('chrome') .forBrowser('chrome')

View File

@ -17,7 +17,11 @@ describe('DevTools panel for Electron', function () {
.withCapabilities({ .withCapabilities({
chromeOptions: { chromeOptions: {
binary: electronPath, binary: electronPath,
args: ['--no-sandbox', `app=${join(__dirname, 'fixture')}`], args: [
'--no-sandbox',
'--disable-dev-shm-usage',
`app=${join(__dirname, 'fixture')}`,
],
}, },
}) })
.forBrowser('electron') .forBrowser('electron')

View File

@ -4,3 +4,5 @@ import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16'; import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() }); Enzyme.configure({ adapter: new Adapter() });
jest.setTimeout(10000);

View File

@ -60,7 +60,7 @@
"prettify": "prettier --write .", "prettify": "prettier --write .",
"prettier:check": "prettier --check .", "prettier:check": "prettier --check .",
"test": "jest --onlyChanged", "test": "jest --onlyChanged",
"test:all": "jest" "test:all": "cross-env BABEL_ENV=test jest --runInBand"
}, },
"workspaces": [ "workspaces": [
"extension", "extension",