From 73cfd55418bad9d18a94353014a5ffc9aa9ea179 Mon Sep 17 00:00:00 2001 From: Shine Wang Date: Mon, 14 Nov 2016 12:55:48 -0500 Subject: [PATCH] Regexp test fixes (#269) * Improved escaping and prettification of regexp replacements. * Extended to RegExp calls. * Removed tab * fixed tests --- .../__tests__/transform-regexp-constructors-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-transform-regexp-constructors/__tests__/transform-regexp-constructors-test.js b/packages/babel-plugin-transform-regexp-constructors/__tests__/transform-regexp-constructors-test.js index 8a23b65eb..55d69ca49 100644 --- a/packages/babel-plugin-transform-regexp-constructors/__tests__/transform-regexp-constructors-test.js +++ b/packages/babel-plugin-transform-regexp-constructors/__tests__/transform-regexp-constructors-test.js @@ -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); });