napi-rs/ava.config.mjs

22 lines
541 B
JavaScript
Raw Normal View History

import { cpus } from 'os'
const configuration = {
extensions: ['ts', 'tsx'],
files: ['cli/**/*.spec.ts', 'examples/**/__test__/**/*.spec.ts'],
2020-10-14 17:15:20 +09:00
require: ['ts-node/register/transpile-only'],
2020-09-22 01:19:26 +09:00
environmentVariables: {
TS_NODE_PROJECT: './examples/tsconfig.json',
2020-09-22 01:19:26 +09:00
},
2020-10-14 17:15:20 +09:00
timeout: '1m',
workerThreads: true,
concurrency: process.env.CI ? 2 : cpus().length,
failFast: false,
verbose: !!process.env.CI,
}
if (parseInt(process.versions.napi, 10) < 4) {
configuration.compileEnhancements = false
}
2020-10-14 17:15:20 +09:00
export default configuration