-
Notifications
You must be signed in to change notification settings - Fork 659
Unskip JS emit tests #1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Unskip JS emit tests #1211
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cd24b8e
Unskip JS emit tests
jakebailey 6e62d47
Merge branch 'main' into jabaile/unskip-js
jakebailey 81af5f9
Update baselines again
jakebailey 26be3e5
Disable grammarErrors, outputs to the same path for two files
jakebailey 6f53da2
Finer grained skips, skip bad tests
jakebailey 401ea1a
More skips
jakebailey a3db28b
Skip reasons
jakebailey bfcf87f
One more I missed
jakebailey 0edeebd
Another one that overwrites a file, why
jakebailey aea933d
Less spammy output on expected failures
jakebailey 1c933fa
Old baselines oops
jakebailey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
24 changes: 24 additions & 0 deletions
24
testdata/baselines/reference/conformance/deepElementAccessExpressionInJS.js
This file contains hidden or 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,24 @@ | ||
//// [tests/cases/conformance/salsa/deepElementAccessExpressionInJS.ts] //// | ||
|
||
//// [declarations.d.ts] | ||
declare var module: { | ||
exports: { | ||
[key: string]: any; | ||
}; | ||
} | ||
//// [elementAccessExpressionInJS.js] | ||
if (module[calculatePropertyName(1)]) { | ||
} | ||
function calculatePropertyName(index) { | ||
// this would be some webpack index in real life | ||
return `property${index}`; | ||
} | ||
|
||
|
||
//// [elementAccessExpressionInJS.js] | ||
if (module[calculatePropertyName(1)]) { | ||
} | ||
function calculatePropertyName(index) { | ||
// this would be some webpack index in real life | ||
return `property${index}`; | ||
} |
16 changes: 16 additions & 0 deletions
16
testdata/baselines/reference/conformance/typeTagForMultipleVariableDeclarations.js
This file contains hidden or 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,16 @@ | ||
//// [tests/cases/conformance/typeTagForMultipleVariableDeclarations.ts] //// | ||
|
||
//// [typeTagForMultipleVariableDeclarations.js] | ||
/** @type {number} */ | ||
var x,y,z; | ||
x | ||
y | ||
z | ||
|
||
|
||
//// [typeTagForMultipleVariableDeclarations.js] | ||
/** @type {number} */ | ||
var x, y, z; | ||
x; | ||
y; | ||
z; |
39 changes: 39 additions & 0 deletions
39
testdata/baselines/reference/submodule/compiler/accessorDeclarationEmitJs.js
This file contains hidden or 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,39 @@ | ||
//// [tests/cases/compiler/accessorDeclarationEmitJs.ts] //// | ||
|
||
//// [a.js] | ||
export const t1 = { | ||
p: 'value', | ||
get getter() { | ||
return 'value'; | ||
}, | ||
} | ||
|
||
export const t2 = { | ||
v: 'value', | ||
set setter(v) {}, | ||
} | ||
|
||
export const t3 = { | ||
p: 'value', | ||
get value() { | ||
return 'value'; | ||
}, | ||
set value(v) {}, | ||
} | ||
|
||
|
||
|
||
|
||
//// [a.d.ts] | ||
export declare const t1: { | ||
p: string; | ||
readonly getter: string; | ||
}; | ||
export declare const t2: { | ||
v: string; | ||
setter: any; | ||
}; | ||
export declare const t3: { | ||
p: string; | ||
value: string; | ||
}; |
31 changes: 31 additions & 0 deletions
31
testdata/baselines/reference/submodule/compiler/accessorDeclarationEmitJs.js.diff
This file contains hidden or 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,31 @@ | ||
--- old.accessorDeclarationEmitJs.js | ||
+++ new.accessorDeclarationEmitJs.js | ||
@@= skipped -24, +24 lines =@@ | ||
|
||
|
||
//// [a.d.ts] | ||
-export namespace t1 { | ||
- let p: string; | ||
- const getter: string; | ||
-} | ||
-export namespace t2 { | ||
- let v: string; | ||
- let setter: any; | ||
-} | ||
-export namespace t3 { | ||
- let p_1: string; | ||
- export { p_1 as p }; | ||
- export let value: string; | ||
-} | ||
+export declare const t1: { | ||
+ p: string; | ||
+ readonly getter: string; | ||
+}; | ||
+export declare const t2: { | ||
+ v: string; | ||
+ setter: any; | ||
+}; | ||
+export declare const t3: { | ||
+ p: string; | ||
+ value: string; | ||
+}; |
40 changes: 40 additions & 0 deletions
40
testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js
This file contains hidden or 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,40 @@ | ||
//// [tests/cases/compiler/allowJscheckJsTypeParameterNoCrash.ts] //// | ||
|
||
//// [func.ts] | ||
interface ComponentOptions<V> { | ||
watch: Record<string, WatchHandler<any>>; | ||
} | ||
type WatchHandler<T> = (val: T) => void; | ||
declare function extend(options: ComponentOptions<{}>): void; | ||
export var vextend = extend; | ||
//// [app.js] | ||
import {vextend} from './func'; | ||
// hover on vextend | ||
export var a = vextend({ | ||
watch: { | ||
data1(val) { | ||
this.data2 = 1; | ||
}, | ||
data2(val) { }, | ||
} | ||
}); | ||
|
||
//// [func.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.vextend = void 0; | ||
exports.vextend = extend; | ||
//// [app.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.a = void 0; | ||
const func_1 = require("./func"); | ||
// hover on vextend | ||
exports.a = (0, func_1.vextend)({ | ||
watch: { | ||
data1(val) { | ||
this.data2 = 1; | ||
}, | ||
data2(val) { }, | ||
} | ||
}); |
11 changes: 11 additions & 0 deletions
11
testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff
This file contains hidden or 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,11 @@ | ||
--- old.allowJscheckJsTypeParameterNoCrash.js | ||
+++ new.allowJscheckJsTypeParameterNoCrash.js | ||
@@= skipped -27, +27 lines =@@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.a = void 0; | ||
-var func_1 = require("./func"); | ||
+const func_1 = require("./func"); | ||
// hover on vextend | ||
exports.a = (0, func_1.vextend)({ | ||
watch: { |
19 changes: 19 additions & 0 deletions
19
testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js
This file contains hidden or 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,19 @@ | ||
//// [tests/cases/compiler/ambientRequireFunction.ts] //// | ||
|
||
//// [node.d.ts] | ||
declare function require(moduleName: string): any; | ||
|
||
declare module "fs" { | ||
export function readFileSync(s: string): string; | ||
} | ||
|
||
//// [app.js] | ||
/// <reference path="node.d.ts"/> | ||
|
||
const fs = require("fs"); | ||
const text = fs.readFileSync("/a/b/c"); | ||
|
||
//// [app.js] | ||
/// <reference path="node.d.ts"/> | ||
const fs = require("fs"); | ||
const text = fs.readFileSync("/a/b/c"); |
19 changes: 19 additions & 0 deletions
19
testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js
This file contains hidden or 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,19 @@ | ||
//// [tests/cases/compiler/ambientRequireFunction.ts] //// | ||
|
||
//// [node.d.ts] | ||
declare function require(moduleName: string): any; | ||
|
||
declare module "fs" { | ||
export function readFileSync(s: string): string; | ||
} | ||
|
||
//// [app.js] | ||
/// <reference path="node.d.ts"/> | ||
|
||
const fs = require("fs"); | ||
const text = fs.readFileSync("/a/b/c"); | ||
|
||
//// [app.js] | ||
/// <reference path="node.d.ts"/> | ||
const fs = require("fs"); | ||
const text = fs.readFileSync("/a/b/c"); |
36 changes: 36 additions & 0 deletions
36
testdata/baselines/reference/submodule/compiler/amdLikeInputDeclarationEmit.js
This file contains hidden or 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,36 @@ | ||
//// [tests/cases/compiler/amdLikeInputDeclarationEmit.ts] //// | ||
|
||
//// [typing.d.ts] | ||
declare function define<T=unknown>(name: string, modules: string[], ready: (...modules: unknown[]) => T); | ||
//// [BaseClass.d.ts] | ||
declare module "deps/BaseClass" { | ||
class BaseClass { | ||
static extends<A>(a: A): new () => A & BaseClass; | ||
} | ||
export = BaseClass; | ||
} | ||
//// [ExtendedClass.js] | ||
define("lib/ExtendedClass", ["deps/BaseClass"], | ||
/** | ||
* {typeof import("deps/BaseClass")} | ||
* @param {typeof import("deps/BaseClass")} BaseClass | ||
* @returns | ||
*/ | ||
(BaseClass) => { | ||
|
||
const ExtendedClass = BaseClass.extends({ | ||
f: function() { | ||
return "something"; | ||
} | ||
}); | ||
|
||
// Exports the module in a way tsc recognize class export | ||
const module = {}; | ||
module.exports = ExtendedClass | ||
return module.exports; | ||
}); | ||
|
||
|
||
|
||
//// [ExtendedClass.d.ts] | ||
export {}; |
11 changes: 11 additions & 0 deletions
11
testdata/baselines/reference/submodule/compiler/amdLikeInputDeclarationEmit.js.diff
This file contains hidden or 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,11 @@ | ||
--- old.amdLikeInputDeclarationEmit.js | ||
+++ new.amdLikeInputDeclarationEmit.js | ||
@@= skipped -32, +32 lines =@@ | ||
|
||
|
||
//// [ExtendedClass.d.ts] | ||
-export = ExtendedClass; | ||
-declare const ExtendedClass: new () => { | ||
- f: () => "something"; | ||
-} & import("deps/BaseClass"); | ||
+export {}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.