Files
appium/.wallaby.js
T
Christopher Hiller ee00285b38 chore: global chai
This PR makes `chai` and `should()` _globals_ when using Mocha:

- `chai` is configured with `chai-as-promised`
- A `.mocharc.js` requires `./test/setup.js` _from the monorepo root_.
- Updated the ESLint config to recognize the globals.
- Updated Wallaby config

All instances of `import chai...` and the like have been removed from all test files.
2021-08-13 10:40:52 -07:00

61 lines
1.4 KiB
JavaScript

'use strict';
module.exports = (wallaby) => {
return {
compilers: {
'**/*.js': wallaby.compilers.babel(),
},
debug: true,
env: {
type: 'node',
},
files: [
'./packages/**/*.js',
'./packages/**/*.json',
'!./packages/**/build/**',
'!./packages/**/test/**/*-specs.js',
'!./packages/*/node_modules/**',
'!./packages/*/gulpfile.js',
// below this are fixtures
{
binary: true,
pattern: './packages/support/test/assets/sample_binary.plist',
},
{
instrument: false,
pattern: './packages/support/test/assets/sample_text.plist',
},
{
instrument: false,
pattern: './packages/*/test/**/fixtures/**/*',
},
{
instrument: false,
pattern: './packages/base-driver/static/**/*',
},
{
instrument: false,
pattern: './packages/gulp-plugins/build/**/*',
},
{
instrument: false,
pattern: './test/setup.js'
}
],
testFramework: 'mocha',
tests: [
'./packages/*/test/**/*-specs.js',
'!./packages/*/test/**/*-e2e-specs.js',
'!./packages/*/node_modules/**',
// this is more of an E2E test and it's tedious to run
'!./packages/gulp-plugins/test/transpile-specs.js',
],
workers: {
restart: true,
},
setup() {
require('./test/setup');
}
};
};