Skip to content

Commit 8959801

Browse files
committed
Add missing local test
1 parent 0a85f20 commit 8959801

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

test/fixtures/bad-syntax/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var configure = require('../configure.js');
44

55
module.exports = configure(__dirname, {
6-
error: /ejs-html-loader.+EJS render error/,
6+
error: /ejs-html-loader/,
77
options: {
88
heading: 'Some heading'
99
}

test/fixtures/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
module.exports = {
4+
badLocals: require('./bad-locals/webpack.config'),
45
badSyntax: require('./bad-syntax/webpack.config'),
56
context: require('./context/webpack.config'),
67
delimiter: require('./delimiter/webpack.config'),

test/fixtures/with-include/index.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<title>Include</title>
66
</head>
77
<body>
8-
<div><%- include('partial', {subheading: subheading}) %></div>
8+
<div><%- include partial %></div>
99
</body>
1010
</html>

test/index.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ describe('loader:ejs-html-loader', function() {
6060
});
6161
});
6262

63+
describe('missing local variable', function() {
64+
it('emits a custom Error', function(done) {
65+
testError(fixtures.badLocals, done);
66+
});
67+
});
68+
6369
});
6470

6571
function testMatch(config, done) {

0 commit comments

Comments
 (0)