Skip to content

Commit ed75ab8

Browse files
committed
Added a test case
1 parent f16388a commit ed75ab8

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/cases/context/issue-5750/folder/a‎

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
it("should not use regexps with the g flag", function() {
2+
require.context("./folder", true, /a/).keys().length.should.be.eql(1);
3+
require.context("./folder", true, /a/g).keys().length.should.be.eql(0);
4+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = [
2+
[/Critical dependency: Contexts can't use RegExps with the 'g' or 'y' flags/],
3+
];

0 commit comments

Comments
 (0)