UNPKG

yarn-audit-html

Version:

Generate a HTML report for Yarn Audit

53 lines (47 loc) 2.07 kB
export default function (wallaby) { return { files: ['src/**/*.ts', { pattern: 'src/**/*.spec.ts', instrument: false, ignore: true }], filesWithNoCoverageCalculated: ['src/reporter.ts'], tests: ['src/**/*.spec.ts', 'fixtures/**/*.ts'], env: { type: 'node', runner: 'node', params: { // runner: '--experimental-vm-modules', require: 'ts-node/register', }, }, compilers: { '**/*.ts': wallaby.compilers.typeScript({ module: 'commonjs', outDir: 'dist', }), }, // When copying JavaScript files, change the extension to `jsts` // this is required to allow TypeScript to compile JavaScript files preprocessors: { '**/*.jsts': (file) => file.changeExt('js').content, }, testFramework: 'mocha', // setup() { // // This copied out of `./test/setup.js`, which uses `@babel/register`. // // Wallaby doesn't need `@babel/register` (and it probably makes Wallaby slow), // // but we need the other stuff, so here it is. // const chai = require('chai'); // const sinonChai = require('sinon-chai'); // // The `chai` global is set if a test needs something special. // // Most tests won't need this. // global.chai = chai.use(sinonChai); // // `should()` is only necessary when working with some `null` or `undefined` values. // global.should = chai.should(); // }, // setup: async function (w) { // const mocha = w.testFramework; // // Change to use compiled version of hooks, not uncompiled version // const rootHooksFile = w.projectCacheDir + `/test/hooks.js`; // const rootHook = await import(rootHooksFile); // mocha.suite.afterEach = rootHook.mochaHooks.afterEach; // }, workers: { restart: true }, }; }