Преглед изворни кода

disable dll and hard-source in test

sorrycc пре 7 година
родитељ
комит
c6139e0332
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 1 1
      config/config.js
  2. 1 0
      tests/run-tests.js

+ 1 - 1
config/config.js

@@ -22,7 +22,7 @@ export default {
         },
         polyfills: ['ie9'],
         ...(
-          require('os').platform() === 'darwin'
+          (!process.env.TEST && require('os').platform() === 'darwin')
           ? {
               dll: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'],
               hardSource: true,

+ 1 - 0
tests/run-tests.js

@@ -3,6 +3,7 @@ const { kill } = require('cross-port-killer');
 
 const env = Object.create(process.env);
 env.BROWSER = 'none';
+env.TEST = true;
 const startServer = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['start'], {
   env,
 });