Fix typo in wrapRegExp helper (#9726)
This commit is contained in:
10
packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/issue-9722.js
vendored
Normal file
10
packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/issue-9722.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const regex1 = /(?<alpha>\w+):(?<bravo>\d+)/;
|
||||
const regex2 = /(?<alpha>\w+):(?<bravo>[a-z]+):(?<charlie>\w+)/;
|
||||
|
||||
const result = regex2.exec("foo:abc:bar");
|
||||
|
||||
expect(result.groups).toEqual({
|
||||
alpha: "foo",
|
||||
bravo: "abc",
|
||||
charlie: "bar",
|
||||
});
|
||||
Reference in New Issue
Block a user