-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
36 lines (28 loc) · 988 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* global describe, it, before */
'use strict';
var ROOT_DIR = require('path').resolve(__dirname, '../..');
var webpack = require('webpack');
var expect = require('chai').expect;
describe('fumble', function () {
var fumble;
before(function () {
fumble = require(ROOT_DIR);
});
it('should provide an http object', function () {
expect(fumble).to.have.property('http').that.is.an('object').and.is.not.empty;
expect(fumble).to.have.deep.property('http.create').that.is.a('function');
});
it('should not error when requiring the webpack generated file', function (done) {
var config = {
entry: ROOT_DIR,
output: {
path: ROOT_DIR + '/artifacts/webpack-test',
filename: 'fumble.webpack.js'
}
};
webpack(config, function () {
require([config.output.path, config.output.filename].join('/'));
done();
});
});
});