Last active
January 2, 2018 02:47
-
-
Save cecilemuller/90abeeed75cd4aa3089fcd67414aaee9 to your computer and use it in GitHub Desktop.
Wallaby.js for Typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const wallabyWebpack = require('wallaby-webpack'); | |
// Headless Chrome tests | |
module.exports = wallaby => ({ | |
debug: true, | |
testFramework: 'jasmine', | |
files: [ | |
{pattern: 'src/**/*.ts', load: false}, | |
'!src/**/*.spec.ts', | |
'!src/**/*.spec.chrome.ts', | |
{pattern: 'src/**/package.json', load: false, instrument: false}, | |
{pattern: 'src/**/fixtures/*.*', load: false, instrument: false} | |
], | |
tests: [ | |
{pattern: 'src/**/*.spec.chrome.ts', load: false} | |
], | |
env: { | |
kind: 'chrome' | |
}, | |
preprocessors: { | |
'**/package.json': file => file.content.replace('.ts', '.js') | |
}, | |
postprocessor: wallabyWebpack({}), | |
setup: () => { | |
window.__moduleBundler.loadTests(); // eslint-disable-line no-underscore-dangle | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Node tests | |
module.exports = () => ({ | |
debug: true, | |
testFramework: 'jasmine', | |
files: [ | |
'src/**/*.ts', | |
'!src/**/*.spec.ts', | |
'!src/**/*.spec.chrome.ts', | |
{pattern: 'src/**/package.json', instrument: false, load: false}, | |
{pattern: 'src/**/fixtures/*.*', instrument: false, load: false} | |
], | |
tests: [ | |
'src/**/*.spec.ts' | |
], | |
env: { | |
type: 'node' | |
}, | |
preprocessors: { | |
'**/package.json': file => file.content.replace('.ts', '.js') | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment