From 9b772cb4fd7d3b8033f11f4779ecb803c61e0d50 Mon Sep 17 00:00:00 2001 From: James Henry Date: Wed, 14 Jun 2017 11:10:03 +0100 Subject: [PATCH] Add test for comment in TypeScript type parameters (#2132) --- tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap | 7 +++++++ tests/typescript_comments/type-parameters.ts | 1 + 2 files changed, 8 insertions(+) create mode 100644 tests/typescript_comments/type-parameters.ts diff --git a/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap index 6bc1ee7f..2b11e020 100644 --- a/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap @@ -124,6 +124,13 @@ export type WrappedFormUtils = { `; +exports[`type-parameters.ts 1`] = ` +functionName(); +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +functionName(); + +`; + exports[`types.ts 1`] = ` (() => { // swallow error and fallback to using directory as path diff --git a/tests/typescript_comments/type-parameters.ts b/tests/typescript_comments/type-parameters.ts new file mode 100644 index 00000000..e993143a --- /dev/null +++ b/tests/typescript_comments/type-parameters.ts @@ -0,0 +1 @@ +functionName();