metalpress
Version:
Create a blog easily with Metalsmith.
29 lines (25 loc) • 788 B
JavaScript
import path from 'path';
import createDefaults from '../../src/config/defaults';
import {
expect
} from 'chai';
describe('#createDefaults', () => {
it('should create correct defaults without loaders', () => {
var defaults = createDefaults({
basePath: path.resolve(__dirname, '../fixtures/webpack'),
jquery: true,
webpack: {
dev: './webpack.config.js',
prod: './webpack.config.js'
}
})
expect(defaults.webpack.dev.module.loaders).to.have.lengthOf(0)
});
it('should create correct defaults with default loaders', () => {
var defaults = createDefaults({
basePath: path.resolve(__dirname, '../fixtures/webpack'),
jquery: true
});
expect(defaults.webpack.dev.module.loaders).to.have.lengthOf(4);
});
});