fix: tests for empty type parameters in TS (#6960)
This commit is contained in:
1 parent
e76ce2725b
commit
a9217a76e5
3 files changed
+71
No files matched your search
@@ -0,0 +1,51 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`generic.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
f1<>();
|
||||
|
||||
new f2<>();
|
||||
|
||||
function f3<>() {}
|
||||
|
||||
class f4 {
|
||||
constructor<>() {}
|
||||
}
|
||||
|
||||
const f5 = function<>() {}
|
||||
|
||||
interface f6<> {
|
||||
test<>();
|
||||
}
|
||||
|
||||
class f7<> {
|
||||
test<>() {}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
f1<>();
|
||||
|
||||
new f2<>();
|
||||
|
||||
function f3<>() {}
|
||||
|
||||
class f4 {
|
||||
constructor<>() {}
|
||||
}
|
||||
|
||||
const f5 = function<>() {};
|
||||
|
||||
interface f6<> {
|
||||
test<>();
|
||||
}
|
||||
|
||||
class f7<> {
|
||||
test<>() {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1,19 @@
|
||||
f1<>();
|
||||
|
||||
new f2<>();
|
||||
|
||||
function f3<>() {}
|
||||
|
||||
class f4 {
|
||||
constructor<>() {}
|
||||
}
|
||||
|
||||
const f5 = function<>() {}
|
||||
|
||||
interface f6<> {
|
||||
test<>();
|
||||
}
|
||||
|
||||
class f7<> {
|
||||
test<>() {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
run_spec(__dirname, ["typescript"]);
|
||||
Reference in new issue
Block a user