Skip to content

Commit

Permalink
Add test for babel/babel#12072
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Oct 16, 2020
1 parent cab1ee7 commit e418282
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions tests/js/literal/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`invalid-exponent.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
12.3e
=====================================output=====================================
12.3e;
================================================================================
`;

exports[`number.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
Expand Down
1 change: 1 addition & 0 deletions tests/js/literal/invalid-exponent.js
@@ -0,0 +1 @@
12.3e
4 changes: 3 additions & 1 deletion tests/js/literal/jsfmt.spec.js
@@ -1,2 +1,4 @@
// flow-parser@0.38.0 fails to parse `1.e1`, so use babel here.
run_spec(__dirname, ["babel", "typescript"], { errors: { espree: true } });
run_spec(__dirname, ["babel", "typescript"], {
errors: { espree: true, typescript: ["invalid-exponent.js"] },
});

0 comments on commit e418282

Please sign in to comment.