make test pass for multicat parsing with two xlsx files for testing.
[sgn.git] / js / test.webpack.config.js
blobbc49e58846cd6fba74ec76fb021408233c566acb
1 const rootConfig = require("./build.webpack.config.js");
2 const merge = require('deepmerge');
3 const isPlainObject = require('is-plain-object');
4 const path = require('path');
5 const glob = require("glob");
7 const testPath = path.resolve(__dirname, "test");
8 const testBuildPath = path.resolve(__dirname, "test_build/");
10 // Use the same config as the main build but change the settings below
11 module.exports = merge(rootConfig,{
12   entry: (() => {
13       var entries = {};
14       glob.sync(path.resolve(testPath, "**/*.js")).forEach(val => {
15           entries[val] = val;
16       });
17       Object.setPrototypeOf(entries,null); //Make not a plain object
18       return entries;
19   })(),
20   output: {
21     path: testBuildPath
22   },
23   externals: {
24     tape: 'tape',
25     nock: 'nock'
26   }
27 },{
28         isMergeableObject: isPlainObject
29 });