diff --git a/config/config.js b/config/config.js index 766780e5e0343bf5758812017b78db7e15baea3d..280f0c9e2e7640350f0603ff3745550c6bdacc9b 100644 --- a/config/config.js +++ b/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, diff --git a/tests/run-tests.js b/tests/run-tests.js index 7a51228c4138805c5ed43dd198cb6aeb4bd314a7..c371d492931285eb8fad9159787e6fef9861fb55 100644 --- a/tests/run-tests.js +++ b/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, });