forked from swc-project/swc
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(es): Support tsc multi-file unit tests (swc-project#5316)
- Loading branch information
1 parent
7309091
commit 1b0d9f7
Showing
1,712 changed files
with
23,605 additions
and
7,213 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/1.0lib-noErrors_es2015.1.normal.js
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,12 @@ | ||
//! | ||
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode | ||
//! ,---- | ||
//! 30 | declare function eval(x: string): any; | ||
//! : ^^^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/1.0lib-noErrors_es2015.2.minified.js
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,12 @@ | ||
//! | ||
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode | ||
//! ,---- | ||
//! 30 | declare function eval(x: string): any; | ||
//! : ^^^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/1.0lib-noErrors_es5.1.normal.js
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,12 @@ | ||
//! | ||
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode | ||
//! ,---- | ||
//! 30 | declare function eval(x: string): any; | ||
//! : ^^^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/1.0lib-noErrors_es5.2.minified.js
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,12 @@ | ||
//! | ||
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode | ||
//! ,---- | ||
//! 30 | declare function eval(x: string): any; | ||
//! : ^^^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
1 change: 1 addition & 0 deletions
1
...references/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot_es2015.1.normal.js
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// @filename: module.d.ts | ||
// @filename: function.d.ts | ||
// @filename: test.ts | ||
var cl; | ||
var cl = Point(); | ||
|
1 change: 1 addition & 0 deletions
1
...sc-references/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot_es5.1.normal.js
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// @filename: module.d.ts | ||
// @filename: function.d.ts | ||
// @filename: test.ts | ||
var cl; | ||
var cl = Point(); | ||
|
1 change: 1 addition & 0 deletions
1
.../tests/tsc-references/AmbientModuleAndAmbientWithSameNameAndCommonRoot_es2015.1.normal.js
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// @filename: module.d.ts | ||
// @filename: class.d.ts | ||
// @filename: test.ts | ||
var p; | ||
var p = A.Point.Origin; | ||
|
1 change: 1 addition & 0 deletions
1
...swc/tests/tsc-references/AmbientModuleAndAmbientWithSameNameAndCommonRoot_es5.1.normal.js
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// @filename: module.d.ts | ||
// @filename: class.d.ts | ||
// @filename: test.ts | ||
var p; | ||
var p = A.Point.Origin; | ||
|
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
2 changes: 1 addition & 1 deletion
2
...s/tsc-references/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot_es5.1.normal.js
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
1 change: 1 addition & 0 deletions
1
...ences/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot_es2015.2.minified.js
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 @@ | ||
Point(), Point.Origin; |
1 change: 1 addition & 0 deletions
1
...ferences/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot_es5.2.minified.js
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 @@ | ||
Point(), Point.Origin; |
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
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
11 changes: 8 additions & 3 deletions
11
crates/swc/tests/tsc-references/ClassAndModuleWithSameNameAndCommonRootES6_es5.2.minified.js
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
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
11 changes: 8 additions & 3 deletions
11
crates/swc/tests/tsc-references/ClassAndModuleWithSameNameAndCommonRoot_es5.2.minified.js
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
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/ES5For-of12_es2015.1.normal.js
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,12 @@ | ||
//! | ||
//! x Cannot assign to this | ||
//! ,---- | ||
//! 1 | for ([""] of [[""]]) { } | ||
//! : ^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/ES5For-of12_es2015.2.minified.js
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,12 @@ | ||
//! | ||
//! x Cannot assign to this | ||
//! ,---- | ||
//! 1 | for ([""] of [[""]]) { } | ||
//! : ^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/ES5For-of12_es5.1.normal.js
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,12 @@ | ||
//! | ||
//! x Cannot assign to this | ||
//! ,---- | ||
//! 1 | for ([""] of [[""]]) { } | ||
//! : ^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
12 changes: 12 additions & 0 deletions
12
crates/swc/tests/tsc-references/ES5For-of12_es5.2.minified.js
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,12 @@ | ||
//! | ||
//! x Cannot assign to this | ||
//! ,---- | ||
//! 1 | for ([""] of [[""]]) { } | ||
//! : ^^ | ||
//! `---- | ||
//! | ||
//! | ||
//!Caused by: | ||
//! 0: failed to process input file | ||
//! 1: error was recoverable, but proceeding would result in wrong codegen | ||
//! 2: Syntax Error |
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
11 changes: 8 additions & 3 deletions
11
.../swc/tests/tsc-references/FunctionAndModuleWithSameNameAndCommonRoot_es2015.2.minified.js
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
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
9 changes: 6 additions & 3 deletions
9
...s/tsc-references/FunctionAndModuleWithSameNameAndDifferentCommonRoot_es2015.2.minified.js
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
var A, B; | ||
var A; | ||
(A || (A = {})).Point = function() { | ||
return { | ||
x: 0, | ||
y: 0 | ||
}; | ||
}, function(B) { | ||
}; | ||
var B; | ||
!function(B) { | ||
(B.Point || (B.Point = {})).Origin = { | ||
x: 0, | ||
y: 0 | ||
}; | ||
}(B || (B = {})), A.Point, B.Point.Origin; | ||
}(B || (B = {})); | ||
A.Point, B.Point.Origin; |
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
Oops, something went wrong.