Skip to content

Commit

Permalink
Add test for babel/babel#12076
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Oct 15, 2020
1 parent b5308bd commit 6f61761
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions tests/js/objects/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -143,6 +143,20 @@ printWidth: 80
================================================================================
`;

exports[`invalid-setter.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
({ set x(){} });
=====================================output=====================================
({ set x() {} });
================================================================================
`;

exports[`method.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
Expand Down
1 change: 1 addition & 0 deletions tests/js/objects/invalid-setter.js
@@ -0,0 +1 @@
({ set x(){} });
9 changes: 8 additions & 1 deletion tests/js/objects/jsfmt.spec.js
@@ -1,3 +1,10 @@
run_spec(__dirname, ["babel"], {
errors: { espree: ["expression.js", "invalid-accessor-generator.js"] },
errors: {
espree: [
"expression.js",
"invalid-accessor-generator.js",
"invalid-setter.js",
],
flow: ["invalid-setter.js"],
},
});

0 comments on commit 6f61761

Please sign in to comment.