napi-rs/ava.config.cjs
2020-10-14 09:37:10 +08:00

18 lines
445 B
JavaScript

const configuration = {
extensions: ['ts', 'tsx'],
files: ['test_module/__test__/**/*.spec.ts'],
require: [
require('os').platform() === 'freebsd'
? 'ts-node/register/transpile-only'
: '@swc-node/register',
],
environmentVariables: {
TS_NODE_PROJECT: './test_module/tsconfig.json',
},
}
if (parseInt(process.versions.napi, 10) < 4) {
configuration.compileEnhancements = false
}
module.exports = configuration