Added a test case

This commit is contained in:
Simon Paris 2017-10-10 18:29:40 +08:00
parent f16388a22d
commit ed75ab8fe8
3 changed files with 7 additions and 0 deletions

View File

View File

@ -0,0 +1,4 @@
it("should not use regexps with the g flag", function() {
require.context("./folder", true, /a/).keys().length.should.be.eql(1);
require.context("./folder", true, /a/g).keys().length.should.be.eql(0);
});

View File

@ -0,0 +1,3 @@
module.exports = [
[/Critical dependency: Contexts can't use RegExps with the 'g' or 'y' flags/],
];