test(typescript): do not fail debug check on Literal -> Identifier (#1540)
parent
97ea416c69
commit
5fd9cd01de
|
@ -189,7 +189,7 @@ function format(input) {
|
|||
|
||||
// We change {'key': value} into {key: value}
|
||||
if (
|
||||
ast.type === "Property" &&
|
||||
(ast.type === "Property" || ast.type === "MethodDefinition") &&
|
||||
typeof ast.key === "object" &&
|
||||
ast.key &&
|
||||
(ast.key.type === "Literal" || ast.key.type === "Identifier")
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
class C {
|
||||
"foo"();
|
||||
"bar"() { }
|
||||
}
|
|
@ -1,5 +1,18 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`ClassDeclaration22.ts 1`] = `
|
||||
class C {
|
||||
"foo"();
|
||||
"bar"() { }
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class C {
|
||||
foo();
|
||||
bar() {}
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
exports[`badArrayIndex.ts 1`] = `
|
||||
var results = number[];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in New Issue