diff --git a/tests/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap b/tests/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000000..76095c788dd9 --- /dev/null +++ b/tests/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`number.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11854 + +a = 09e1_1; +a = 09.1_1; + +=====================================output===================================== +// https://github.com/babel/babel/pull/11854 + +a = 09e1_1; +a = 09.1_1; + +================================================================================ +`; diff --git a/tests/js/numeric-separators/jsfmt.spec.js b/tests/js/numeric-separators/jsfmt.spec.js new file mode 100644 index 000000000000..858ac91aadcc --- /dev/null +++ b/tests/js/numeric-separators/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/js/numeric-separators/number.js b/tests/js/numeric-separators/number.js new file mode 100644 index 000000000000..2edc84a44dcb --- /dev/null +++ b/tests/js/numeric-separators/number.js @@ -0,0 +1,4 @@ +// https://github.com/babel/babel/pull/11854 + +a = 09e1_1; +a = 09.1_1; diff --git a/tests/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap b/tests/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap index ad9d3156c6aa..fcb3de7fa45b 100644 --- a/tests/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap @@ -27,3 +27,12 @@ exports[`module-attributes-static.js error test 1`] = ` | ^^^^ 2 | " `; + +exports[`number.js error test 1`] = ` +"Unexpected token ILLEGAL (3:5) + 1 | // https://github.com/babel/babel/pull/11854 + 2 | +> 3 | a = 09e1_1; + | ^^^^ + 4 | " +`; diff --git a/tests/misc/errors/flow/number.js b/tests/misc/errors/flow/number.js new file mode 100644 index 000000000000..df9aa2183371 --- /dev/null +++ b/tests/misc/errors/flow/number.js @@ -0,0 +1,3 @@ +// https://github.com/babel/babel/pull/11854 + +a = 09e1_1;