From 87b322cfc2d06a27eff4dcdc3f839d92261be7e0 Mon Sep 17 00:00:00 2001 From: James Henry Date: Thu, 24 Aug 2017 19:26:33 +0100 Subject: [PATCH] Add failing test case --- .../type-arguments/whitespace/actual.js | 1 + .../type-arguments/whitespace/expected.json | 120 ++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 test/fixtures/typescript/type-arguments/whitespace/actual.js create mode 100644 test/fixtures/typescript/type-arguments/whitespace/expected.json diff --git a/test/fixtures/typescript/type-arguments/whitespace/actual.js b/test/fixtures/typescript/type-arguments/whitespace/actual.js new file mode 100644 index 0000000000..56d367c193 --- /dev/null +++ b/test/fixtures/typescript/type-arguments/whitespace/actual.js @@ -0,0 +1 @@ +function f< T >() {} \ No newline at end of file diff --git a/test/fixtures/typescript/type-arguments/whitespace/expected.json b/test/fixtures/typescript/type-arguments/whitespace/expected.json new file mode 100644 index 0000000000..b3a7ad56db --- /dev/null +++ b/test/fixtures/typescript/type-arguments/whitespace/expected.json @@ -0,0 +1,120 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "module", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "f" + }, + "name": "f" + }, + "generator": false, + "expression": false, + "async": false, + "typeParameters": { + "type": "TypeParameterDeclaration", + "start": 10, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "params": [ + { + "type": "TypeParameter", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "T" + } + ] + }, + "params": [], + "body": { + "type": "BlockStatement", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file