diff --git a/tests/js/reserved-word/__snapshots__/jsfmt.spec.js.snap b/tests/js/reserved-word/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000000..f0f1cb3543b7 --- /dev/null +++ b/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"; + +================================================================================ +`; diff --git a/tests/js/reserved-word/interfaces.js b/tests/js/reserved-word/interfaces.js new file mode 100644 index 000000000000..2ce057e27fd8 --- /dev/null +++ b/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"; diff --git a/tests/js/reserved-word/jsfmt.spec.js b/tests/js/reserved-word/jsfmt.spec.js new file mode 100644 index 000000000000..0fab4456dc8e --- /dev/null +++ b/tests/js/reserved-word/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["babel"], { errors: { espree: true, meriyah: true } });