mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
Add simple tests for HMR usage
This commit is contained in:
parent
18ff31dd61
commit
19a2eb963a
@ -3,6 +3,7 @@
|
||||
|
||||
var path = require('path');
|
||||
var helpers = require('yeoman-generator').test;
|
||||
var assert = require('yeoman-generator').assert;
|
||||
var _ = require('underscore.string');
|
||||
|
||||
describe('react-webpack generator', function() {
|
||||
@ -93,6 +94,19 @@ describe('react-webpack generator', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('should use HMR webpack API inside of configs', function (done) {
|
||||
react.run({}, function() {
|
||||
assert.fileContent([
|
||||
['package.json', /react-hot-loader/],
|
||||
['Gruntfile.js', /hot:\s*true/],
|
||||
['webpack.config.js', /react-hot/],
|
||||
['webpack.config.js', /webpack\.HotModuleReplacementPlugin/],
|
||||
['webpack.config.js', /webpack\/hot\/dev-server/]
|
||||
]);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Subgenerators', function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user