-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,45 @@ | ||
"use strict"; | ||
|
||
// AVA configuration | ||
// see https://github.com/avajs/ava | ||
// see https://github.com/avajs/ava/blob/master/docs/06-configuration.md#configuration | ||
// see https://github.com/avajs/ava/blob/master/docs/06-configuration.md#avaconfigjs | ||
// run AVA | ||
// npx ava --match='*foo' | ||
// ./node_modules/.bin/ava --match='*foo' | ||
// see https://github.com/avajs/ava/blob/main/docs/05-command-line.md | ||
|
||
// TODO: consider using precompiled tests/sources | ||
|
||
// noinspection JSUnusedGlobalSymbols | ||
export default { | ||
// see https://github.com/avajs/ava/blob/master/docs/recipes/babel.md | ||
// see https://github.com/avajs/babel | ||
babel: { | ||
compileEnhancements: false, // we add them ourselves below via @ava/babel/transform-test-files | ||
extensions: [ | ||
'ts', | ||
], | ||
testOptions: { | ||
babelrc: false, | ||
configFile: false, | ||
presets: [ | ||
[ | ||
'module:@ava/babel/stage-4', | ||
false, | ||
], | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
// see https://babeljs.io/docs/en/babel-preset-env#browserslist-integration | ||
ignoreBrowserslistConfig: true, | ||
useBuiltIns: 'usage', | ||
corejs: 3, | ||
debug: false, | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
// '@babel/preset-react', | ||
'@ava/babel/transform-test-files', | ||
], | ||
}, | ||
// https://github.com/avajs/ava/blob/main/docs/06-configuration.md | ||
module.exports = { | ||
// https://github.com/avajs/ava/blob/main/docs/recipes/typescript.md | ||
extensions: { | ||
// https://github.com/avajs/ava/blob/main/docs/06-configuration.md#configuring-module-formats | ||
js: true, | ||
ts: 'commonjs', | ||
}, | ||
// extensions: ['.js', '.ts'], | ||
require: [ | ||
'./test/_register.js', | ||
], | ||
files: [ | ||
'test/**/*', | ||
'./test/**/*', | ||
], | ||
// to see what triggered the the rests to rerun: | ||
// DEBUG=ava:watcher npx ava --verbose --watch | ||
ignoredByWatcher: [ | ||
'**/.idea/**/*', // .idea/workspace.xml is changed on every file edit | ||
'**/node_modules/**/*', | ||
'temp/**/*', | ||
'dist/**/*', | ||
], | ||
require: [ | ||
// this will transpile all source code files (app/ | ||
'./test/_register.js', | ||
// | ||
// some files and directories are ignored by default, | ||
// see https://github.com/avajs/ava/blob/main/docs/recipes/watch-mode.md#ignoring-changes | ||
// | ||
// note: | ||
// AVA dependency tracking (https://github.com/avajs/ava/blob/main/docs/recipes/watch-mode.md#dependency-tracking) | ||
// currently does not work with native ES modules. | ||
// See | ||
// https://github.com/avajs/ava/issues/2388 | ||
// https://github.com/avajs/ava/pull/3123 | ||
// https://github.com/avajs/ava/issues/2905 | ||
// | ||
// use the following to debug: | ||
// DEBUG=ava:watcher npx ava --watch | ||
// or | ||
// DEBUG=ava:* npx ava --watch | ||
// | ||
'./.idea/', | ||
'./temp/', | ||
'./dist/', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters