Skip to content

Commit

Permalink
test: outputs a manifest of no-js file (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-x- authored and mastilver committed Jul 12, 2017
1 parent a985131 commit a3d3a8e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"codecov": "^2.2.0",
"css-loader": "^0.9.1",
"extract-text-webpack-plugin": "^0.5.0",
"file-loader": "^0.9.0",
"jasmine": "^2.2.1",
"memory-fs": "^0.2.0",
"nyc": "^10.3.2",
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
file
21 changes: 21 additions & 0 deletions spec/plugin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,27 @@ describe('ManifestPlugin', function() {
done();
});
});

it('outputs a manifest of no-js file', function(done) {
webpackCompile({
context: __dirname,
entry: './fixtures/file.txt',
module: {
loaders: [
{ test: /\.(txt)/, loader: 'file-loader?name=file.[ext]' },
]
}
}, {}, function(manifest, stats) {
expect(manifest).toBeDefined();
expect(manifest).toEqual({
'main.js': 'main.js',
'file.txt': 'file.txt'
});

done();
});
});

});

describe('with ExtractTextPlugin', function() {
Expand Down

0 comments on commit a3d3a8e

Please sign in to comment.