Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add fixtures for exported classes with decorators
- Loading branch information
1 parent
39829c0
commit 0da3e5d
Showing
6 changed files
with
561 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...res/fixtures/typescript/decorators/class-decorators/export-default-class-decorator.src.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@sealed | ||
export default class Qux {} |
2 changes: 2 additions & 0 deletions
2
...tures/fixtures/typescript/decorators/class-decorators/export-named-class-decorator.src.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@sealed | ||
export class Qux {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
280 changes: 280 additions & 0 deletions
280
...apshots/typescript/decorators/class-decorators/export-default-class-decorator.src.ts.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,280 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`typescript decorators class-decorators export-default-class-decorator.src 1`] = ` | ||
Object { | ||
"body": Array [ | ||
Object { | ||
"declaration": Object { | ||
"body": Object { | ||
"body": Array [], | ||
"loc": Object { | ||
"end": Object { | ||
"column": 27, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 25, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
33, | ||
35, | ||
], | ||
"type": "ClassBody", | ||
}, | ||
"decorators": Array [ | ||
Object { | ||
"expression": Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 7, | ||
"line": 1, | ||
}, | ||
"start": Object { | ||
"column": 1, | ||
"line": 1, | ||
}, | ||
}, | ||
"name": "sealed", | ||
"range": Array [ | ||
1, | ||
7, | ||
], | ||
"type": "Identifier", | ||
}, | ||
"loc": Object { | ||
"end": Object { | ||
"column": 7, | ||
"line": 1, | ||
}, | ||
"start": Object { | ||
"column": 0, | ||
"line": 1, | ||
}, | ||
}, | ||
"range": Array [ | ||
0, | ||
7, | ||
], | ||
"type": "Decorator", | ||
}, | ||
], | ||
"id": Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 24, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 21, | ||
"line": 2, | ||
}, | ||
}, | ||
"name": "Qux", | ||
"range": Array [ | ||
29, | ||
32, | ||
], | ||
"type": "Identifier", | ||
}, | ||
"loc": Object { | ||
"end": Object { | ||
"column": 27, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 15, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
23, | ||
35, | ||
], | ||
"superClass": null, | ||
"type": "ClassDeclaration", | ||
}, | ||
"exportKind": "value", | ||
"loc": Object { | ||
"end": Object { | ||
"column": 27, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 0, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
8, | ||
35, | ||
], | ||
"type": "ExportDefaultDeclaration", | ||
}, | ||
], | ||
"comments": Array [], | ||
"loc": Object { | ||
"end": Object { | ||
"column": 0, | ||
"line": 3, | ||
}, | ||
"start": Object { | ||
"column": 0, | ||
"line": 1, | ||
}, | ||
}, | ||
"range": Array [ | ||
0, | ||
36, | ||
], | ||
"sourceType": "module", | ||
"tokens": Array [ | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 1, | ||
"line": 1, | ||
}, | ||
"start": Object { | ||
"column": 0, | ||
"line": 1, | ||
}, | ||
}, | ||
"range": Array [ | ||
0, | ||
1, | ||
], | ||
"type": "Punctuator", | ||
"value": "@", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 7, | ||
"line": 1, | ||
}, | ||
"start": Object { | ||
"column": 1, | ||
"line": 1, | ||
}, | ||
}, | ||
"range": Array [ | ||
1, | ||
7, | ||
], | ||
"type": "Identifier", | ||
"value": "sealed", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 6, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 0, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
8, | ||
14, | ||
], | ||
"type": "Keyword", | ||
"value": "export", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 14, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 7, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
15, | ||
22, | ||
], | ||
"type": "Keyword", | ||
"value": "default", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 20, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 15, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
23, | ||
28, | ||
], | ||
"type": "Keyword", | ||
"value": "class", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 24, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 21, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
29, | ||
32, | ||
], | ||
"type": "Identifier", | ||
"value": "Qux", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 26, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 25, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
33, | ||
34, | ||
], | ||
"type": "Punctuator", | ||
"value": "{", | ||
}, | ||
Object { | ||
"loc": Object { | ||
"end": Object { | ||
"column": 27, | ||
"line": 2, | ||
}, | ||
"start": Object { | ||
"column": 26, | ||
"line": 2, | ||
}, | ||
}, | ||
"range": Array [ | ||
34, | ||
35, | ||
], | ||
"type": "Punctuator", | ||
"value": "}", | ||
}, | ||
], | ||
"type": "Program", | ||
} | ||
`; |
Oops, something went wrong.