rval icon indicating copy to clipboard operation
rval copied to clipboard

Adding wallaby.js?

Open RainerAtSpirit opened this issue 5 years ago • 0 comments

Adding support for wallaby.js would allow developing/running tests in the editor. I've tested the below locally and can send a PR if needed.

process.env.BABEL_ENV = 'test'
module.exports = function (wallaby) {

  return {
    files: [
      'pkgs/**/*.ts?(x)',
      '!pkgs/**/tests/*.ts?(x)',
      { pattern: 'tsconfig.*', instrument: false },
      { pattern: 'jest.config.json', instrument: false },
      { pattern: 'package.json', instrument: false }
    ],

    tests: [
      'pkgs/**/*.spec.ts?(x)',
      'pkgs/**/tests/*.spec.ts?(x)'
    ],

    env: {
      type: 'node',
      runner: 'node'
    },

    compilers: {
      '**/*.ts?(x)': wallaby.compilers.typeScript({
        module: 'commonjs'
      })
    },

    testFramework: "jest",
    debug: false,

    setup: function (wallaby) {
      var jestConfig = require('./jest.config.json');
      wallaby.testFramework.configure(jestConfig);
    }
  }
}

RainerAtSpirit avatar Dec 31 '18 10:12 RainerAtSpirit