forked from localForage/localForage-sessionStorageWrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.ts
28 lines (26 loc) · 756 Bytes
/
karma.conf.ts
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
/* tslint:disable:no-var-requires */
const path = require('path');
const packageJSON = require('./package.json');
const getKarmaConfig = require('resin-config-karma');
const LF_MODULE_PATH = './node_modules/localforage';
const LF_BROWSER_BUNDLE = path.join(
LF_MODULE_PATH,
require(`${LF_MODULE_PATH}/package.json`).main,
);
const BROWSER_BUNDLE = packageJSON.main;
module.exports = config => {
const karmaConfig = getKarmaConfig(packageJSON);
karmaConfig.webpack.node = {
global: true,
fs: 'empty',
dns: 'empty',
net: 'empty',
process: 'mock',
};
karmaConfig.files = [
LF_BROWSER_BUNDLE,
BROWSER_BUNDLE,
'tests/**/*.spec.ts',
];
config.set(karmaConfig);
};