8000 Add test for #4591 · DINKIN/TypeScript@bb69eb9 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb69eb9

Browse files
committed
Add test for microsoft#4591
1 parent 971c777 commit bb69eb9

6 files changed

+108
-0
lines changed

tests/baselines/reference/sourceMapValidationDefaultExportClass.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/sourceMapValidationDefaultExportClass.js.map

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
===================================================================
2+
JsFile: sourceMapValidationDefaultExportClass.js
3+
mapUrl: sourceMapValidationDefaultExportClass.js.map
4+
sourceRoot:
5+
sources: sourceMapValidationDefaultExportClass.ts
6+
===================================================================
7+
-------------------------------------------------------------------
8+
emittedFile:tests/cases/compiler/sourceMapValidationDefaultExportClass.js
9+
sourceFile:sourceMapValidationDefaultExportClass.ts
10+
-------------------------------------------------------------------
11+
>>>var Product = (function () {
12+
1 >
13+
2 >^^^^^^^^^^^^^^^^^^^^^^^^^->
14+
1 >
15+
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
16+
---
17+
>>> function Product() {
18+
1->^^^^
19+
2 > ^^->
20+
1->
21+
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (Product)
22+
---
23+
>>> }
24+
1->^^^^
25+
2 > ^
26+
3 > ^^^^^^^^^^^^^^^->
27+
1->class Product {
28+
2 > }
29+
1->Emitted(3, 5) Source(1, 17) + SourceIndex(0) name (Product.constructor)
30+
2 >Emitted(3, 6) Source(1, 18) + SourceIndex(0) name (Product.constructor)
31+
---
32+
>>> return Product;
33+
1->^^^^
34+
2 > ^^^^^^^^^^^^^^
35+
1->
36+
2 > }
37+
1->Emitted(4, 5) Source(1, 17) + SourceIndex(0) name (Product)
38+
2 >Emitted(4, 19) Source(1, 18) + SourceIndex(0) name (Product)
39+
---
40+
>>>})();
41+
1 >
42+
2 >^
43+
3 >
44+
4 > ^^^^
45+
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
46+
1 >
47+
2 >}
48+
3 >
49+
4 > class Product { }
50+
1 >Emitted(5, 1) Source(1, 17) + SourceIndex(0) name (Product)
51+
2 >Emitted(5, 2) Source(1, 18) + SourceIndex(0) name (Product)
52+
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
53+
4 >Emitted(5, 6) Source(1, 18) + SourceIndex(0)
54+
---
55+
>>>Object.defineProperty(exports, "__esModule", { value: true });
56+
1->
57+
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^->
58+
1->
59+
>
60+
1->Emitted(6, 1) Source(2, 1) + SourceIndex(0)
61+
---
62+
>>>exports.default = Product;
63+
1->^^^^^^^^^^^^^^^^^^
64+
2 > ^^^^^^^
65+
3 > ^
66+
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
67+
1->export default
68+
2 > Product
69+
3 > ;
70+
1->Emitted(7, 19) Source(2, 16) + SourceIndex(0)
71+
2 >Emitted(7, 26) Source(2, 23) + SourceIndex(0)
72+
3 >Emitted(7, 27) Source(2, 24) + SourceIndex(0)
73+
---
74+
>>>//# sourceMappingURL=sourceMapValidationDefaultExportClass.js.map
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/compiler/sourceMapValidationDefaultExportClass.ts ===
2+
class Product { }
3+
>Product : Symbol(Product, Decl(sourceMapValidationDefaultExportClass.ts, 0, 0))
4+
5+
export default Product;
6+
>Product : Symbol(Product, Decl(sourceMapValidationDefaultExportClass.ts, 0, 0))
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/compiler/sourceMapValidationDefaultExportClass.ts ===
2+
class Product { }
3+
>Product : Product
4+
5+
export default Product;
6+
>Product : Product
7+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// @target: ES5
2+
// @sourcemap: true
3+
// @module: commonjs
4+
class Product { }
5+
export default Product;

0 commit comments

Comments
 (0)
0