diff --git a/tests/typescript_error_recovery/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_error_recovery/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..e37181540 --- /dev/null +++ b/tests/typescript_error_recovery/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`generic.ts 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function<>() {} + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +=====================================output===================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function<>() {}; + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +================================================================================ +`; diff --git a/tests/typescript_error_recovery/generic.ts b/tests/typescript_error_recovery/generic.ts new file mode 100644 index 000000000..aa18ea0f9 --- /dev/null +++ b/tests/typescript_error_recovery/generic.ts @@ -0,0 +1,19 @@ +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function<>() {} + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} diff --git a/tests/typescript_error_recovery/jsfmt.spec.js b/tests/typescript_error_recovery/jsfmt.spec.js new file mode 100644 index 000000000..2ea3bb6eb --- /dev/null +++ b/tests/typescript_error_recovery/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["typescript"]);