forked from excaliburjs/Excalibur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
79 lines (78 loc) · 2.11 KB
/
wallaby.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const path = require('path');
const webpack = require('webpack');
module.exports = function (wallaby) {
return {
files: [
{ pattern: 'src/spec/util/*.ts', load: false },
{ pattern: 'src/engine/**/*.ts', load: false },
{ pattern: 'src/engine/**/*.glsl', load: false },
{ pattern: 'src/spec/images/**/*.mp3' },
{ pattern: 'src/spec/images/**/*.ogg' },
{ pattern: 'src/spec/images/**/*.png' },
{ pattern: 'src/spec/images/**/*.gif' },
{ pattern: 'src/spec/images/**/*.txt' },
{ pattern: 'src/spec/images/**/*.css' },
{ pattern: 'src/spec/images/**/*.woff2' }
],
tests: ['./src/spec/*Spec.ts'],
env: {
kind: 'chrome',
// This is tied to the puppeteer install
runner: './node_modules/puppeteer/.local-chromium/win64-1011831/chrome-win/chrome.exe',
params: {
runner: '--headless --mute-audio --autoplay-policy=no-user-gesture-required'
}
},
testFramework: 'jasmine',
setup: function () {
window.__moduleBundler.loadTests();
},
postprocessor: wallaby.postprocessors.webpack({
mode: 'none',
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.js'],
alias: {
'@excalibur': path.resolve(__dirname, './src/engine/')
}
},
plugins: [
new webpack.DefinePlugin({
'process.env.__EX_VERSION': "'test-runner'"
})
],
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
transpileOnly: true,
projectReferences: true,
configFile: 'tsconfig.json'
}
},
{
test: /\.css$/,
use: ['css-loader']
},
{
test: /\.(png|jpg|gif|mp3)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192
}
}
]
},
{
test: /\.(glsl)$/,
use: ['raw-loader']
}
]
}
})
};
};