napi-rs/ava.config.cjs

19 lines
445 B
JavaScript
Raw Normal View History

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