Skip to content

Commit

Permalink
Add test for babel/babel#12120
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Oct 15, 2020
1 parent d599e72 commit 7417d90
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/js/objects/jsfmt.spec.js
Expand Up @@ -4,6 +4,6 @@ run_spec(__dirname, ["babel"], {
"expression.js",
"invalid-accessor-generator.js",
"invalid-setter.js",
]
],
},
});
14 changes: 14 additions & 0 deletions tests/js/variable_declarator/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

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

exports[`multiple.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
Expand Down
1 change: 1 addition & 0 deletions tests/js/variable_declarator/invalid-const.js
@@ -0,0 +1 @@
const foo;
7 changes: 6 additions & 1 deletion tests/js/variable_declarator/jsfmt.spec.js
@@ -1 +1,6 @@
run_spec(__dirname, ["babel", "flow", "typescript"]);
run_spec(__dirname, ["babel", "flow", "typescript"], {
errors: {
espree: ["invalid-const.js"],
flow: ["invalid-const.js"],
},
});

0 comments on commit 7417d90

Please sign in to comment.