mirror of
https://github.com/certd/certd.git
synced 2026-07-14 01:17:31 +08:00
34 lines
793 B
TypeScript
34 lines
793 B
TypeScript
|
|
import assert from "assert";
|
||
|
|
import { AutoFix } from "./auto-fix.js";
|
||
|
|
|
||
|
|
describe("AutoFix", () => {
|
||
|
|
it("runs fix tasks in order", async () => {
|
||
|
|
const calls: string[] = [];
|
||
|
|
const autoFix = new AutoFix();
|
||
|
|
autoFix.googleCommonEabAccountKeyFix = {
|
||
|
|
async init() {
|
||
|
|
calls.push("google");
|
||
|
|
},
|
||
|
|
} as any;
|
||
|
|
autoFix.oauthSubtypeBoundTypeFix = {
|
||
|
|
async init() {
|
||
|
|
calls.push("oauth");
|
||
|
|
},
|
||
|
|
} as any;
|
||
|
|
autoFix.certInfoWildcardDomainCountFix = {
|
||
|
|
async init() {
|
||
|
|
calls.push("cert");
|
||
|
|
},
|
||
|
|
} as any;
|
||
|
|
autoFix.suiteContentWildcardDomainCountFix = {
|
||
|
|
async init() {
|
||
|
|
calls.push("suite");
|
||
|
|
},
|
||
|
|
} as any;
|
||
|
|
|
||
|
|
await autoFix.init();
|
||
|
|
|
||
|
|
assert.deepEqual(calls, ["google", "oauth", "cert", "suite"]);
|
||
|
|
});
|
||
|
|
});
|