Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Sep 10, 2021
1 parent e40dd44 commit af183d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/lib/converter/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ const conversionOrder = [
ts.SymbolFlags.BlockScopedVariable,
ts.SymbolFlags.FunctionScopedVariable,

ts.SymbolFlags.ValueModule,
ts.SymbolFlags.NamespaceModule,
ts.SymbolFlags.TypeAlias,
ts.SymbolFlags.Function,
ts.SymbolFlags.Method,
Expand All @@ -80,6 +78,9 @@ const conversionOrder = [

ts.SymbolFlags.GetAccessor,
ts.SymbolFlags.SetAccessor,

ts.SymbolFlags.ValueModule,
ts.SymbolFlags.NamespaceModule,
];

// Sanity check, if this fails a dev messed up.
Expand Down
20 changes: 14 additions & 6 deletions src/test/validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import { getConverter2App, getConverter2Program } from "./programs";
function expectWarning(
typeName: string,
file: string,
referencingName: string
referencingNames: string[] | string
) {
const refs = Array.isArray(referencingNames)
? referencingNames
: [referencingNames];

const app = getConverter2App();
const program = getConverter2Program();
const sourceFile = program.getSourceFile(
Expand Down Expand Up @@ -43,10 +47,11 @@ function expectWarning(
),
"Referencing file is different."
);
equal(
match[3],
referencingName,
"Referencing name is different."
ok(
refs.includes(match[3]),
`Referencing name is different, expected ${
match[3]
} to be: ${refs.join(", ")}`
);
}
}
Expand All @@ -62,7 +67,10 @@ describe("validateExports", () => {
});

it("Should warn if a type parameter clause is missing", () => {
expectWarning("Foo", "typeParameter.ts", "Bar.T");
expectWarning("Foo", "typeParameter.ts", [
"Bar.T",
"Bar.constructor.new Bar.T",
]);
});

it("Should warn if an index signature type is missing", () => {
Expand Down

0 comments on commit af183d8

Please sign in to comment.