test: test compile dev/prod webpack config

This commit is contained in:
endiliey 2018-08-11 02:50:41 +08:00
parent 80204b5617
commit a4cc782858
15 changed files with 93 additions and 0 deletions

19
test/loadSetup.js Normal file
View file

@ -0,0 +1,19 @@
import path from 'path';
import load from '@lib/load';
// Helper methods to setup dummy/ fake projects
const loadSetup = async name => {
const simpleWebsite = path.join(__dirname, '__fixtures__', 'simple-website');
const customWebsite = path.join(__dirname, '__fixtures__', 'custom-website');
switch (name) {
case 'simple':
return await load(simpleWebsite);
case 'custom':
return await load(customWebsite);
default:
return {};
}
};
export default loadSetup;