2020-08-24 19:02:21 +09:00
|
|
|
const configuration = {
|
|
|
|
extensions: ['ts', 'tsx'],
|
|
|
|
files: ['test_module/__test__/**/*.spec.ts'],
|
2020-10-13 23:58:29 +09:00
|
|
|
require: [
|
2020-10-14 01:08:22 +09:00
|
|
|
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: {
|
2020-10-14 01:08:22 +09:00
|
|
|
TS_NODE_PROJECT: './test_module/tsconfig.json',
|
2020-09-22 01:19:26 +09:00
|
|
|
},
|
2020-08-24 19:02:21 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
if (parseInt(process.versions.napi, 10) < 4) {
|
|
|
|
configuration.compileEnhancements = false
|
|
|
|
}
|
|
|
|
|
2020-10-14 01:08:22 +09:00
|
|
|
module.exports = configuration
|