Skip to content

Commit

Permalink
Regexp test fixes (#269)
Browse files Browse the repository at this point in the history
* Improved escaping and prettification of regexp replacements.

* Extended to RegExp calls.

* Removed tab

* fixed tests
  • Loading branch information
shinew authored and kangax committed Nov 14, 2016
1 parent 6e9ce59 commit 73cfd55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const ret = /ab+c\\wd/g;`;

it("should prettify special whitespaces", () => {
const source = String.raw`var x = new RegExp('\b\f\v\t\r\n\n');`;
const expected = String.raw`var x = /[\b]\f\v\t\r\n\n/;`;
const expected = String.raw`var x = /[\b]\f\v \r\n\n/;`;
expect(transform(source)).toBe(expected);
});

Expand Down

0 comments on commit 73cfd55

Please sign in to comment.