napi-rs/ava.config.mjs
2022-10-23 23:03:18 +08:00

21 lines
541 B
JavaScript

import { cpus } from 'os'
const configuration = {
extensions: ['ts', 'tsx'],
files: ['cli/**/*.spec.ts', 'examples/**/__test__/**/*.spec.ts'],
require: ['ts-node/register/transpile-only'],
environmentVariables: {
TS_NODE_PROJECT: './examples/tsconfig.json',
},
timeout: '2m',
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
}
export default configuration