Skip to content

Commit

Permalink
Add tests for babel/babel#12254
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Nov 6, 2020
1 parent d7e3214 commit 30099fa
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
41 changes: 41 additions & 0 deletions tests/js/reserved-word/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,41 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`interfaces.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
interface = "foo";
interface + 3;
interface();
class interface {}
interface ? true : false;
function interface() {}
import interface from "foo";
foo.interface;
interface.foo;
new interface();
({ interface: "foo" });
(interface, "foo");
void interface;
const interface = "foo";
=====================================output=====================================
interface = "foo";
interface + 3;
interface();
class interface {}
interface ? true : false;
function interface() {}
import interface from "foo";
foo.interface;
interface.foo;
new interface();
({ interface: "foo" });
interface, "foo";
void interface;
const interface = "foo";
================================================================================
`;
14 changes: 14 additions & 0 deletions tests/js/reserved-word/interfaces.js
@@ -0,0 +1,14 @@
interface = "foo";
interface + 3;
interface();
class interface {}
interface ? true : false;
function interface() {}
import interface from "foo";
foo.interface;
interface.foo;
new interface();
({ interface: "foo" });
(interface, "foo");
void interface;
const interface = "foo";
1 change: 1 addition & 0 deletions tests/js/reserved-word/jsfmt.spec.js
@@ -0,0 +1 @@
run_spec(__dirname, ["babel"], { errors: { espree: true, meriyah: true } });

0 comments on commit 30099fa

Please sign in to comment.