Skip to content

Commit 691b555

Browse files
authored
Rebuild and package status-checker (#420)
1 parent b7065b2 commit 691b555

17 files changed

+872
-867
lines changed

actions/status-checker/__tests__/file-heading-extractor.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import { describe, expect, it } from "@jest/globals";
22
import { getHeadingTextFrom } from "../src/file-heading-extractor";
33

44
beforeAll(() => {
5-
process.env["GITHUB_REPOSITORY"] = "dotnet/docs";
5+
process.env["GITHUB_REPOSITORY"] = "dotnet/docs";
66
});
77

88
describe("file-heading-extractor", () => {
9-
it("when calling getHeadingTextFrom correctly returns H1 value.", async () => {
10-
const path = "__tests__/sample.md";
11-
const actual = await getHeadingTextFrom(path);
12-
expect(actual).toBe("The heading `System.Console` class");
13-
});
9+
it("when calling getHeadingTextFrom correctly returns H1 value.", async () => {
10+
const path = "__tests__/sample.md";
11+
const actual = await getHeadingTextFrom(path);
12+
expect(actual).toBe("The heading `System.Console` class");
13+
});
1414

15-
it("when calling getHeadingTextFrom correctly returns title value.", async () => {
16-
const path = "__tests__/no-heading.md";
17-
const actual = await getHeadingTextFrom(path);
18-
expect(actual).toBe("Phew, that worked!");
19-
});
15+
it("when calling getHeadingTextFrom correctly returns title value.", async () => {
16+
const path = "__tests__/no-heading.md";
17+
const actual = await getHeadingTextFrom(path);
18+
expect(actual).toBe("Phew, that worked!");
19+
});
2020
});

actions/status-checker/__tests__/main.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { wait } from "../src/wait";
22
import { describe, expect, it } from "@jest/globals";
33

44
describe("status-checker", () => {
5-
it("throws invalid number when given 'foo' string", async () => {
6-
const input = parseInt("foo", 10);
7-
await expect(wait(input)).rejects.toThrow("milliseconds not a number");
8-
});
5+
it("throws invalid number when given 'foo' string", async () => {
6+
const input = parseInt("foo", 10);
7+
await expect(wait(input)).rejects.toThrow("milliseconds not a number");
8+
});
99

10-
it("call to 'wait' actually waits 500 ms", async () => {
11-
const start = new Date();
12-
await wait(500);
13-
const end = new Date();
14-
var delta = Math.abs(end.getTime() - start.getTime());
15-
expect(delta).toBeGreaterThan(450);
16-
});
10+
it("call to 'wait' actually waits 500 ms", async () => {
11+
const start = new Date();
12+
await wait(500);
13+
const end = new Date();
14+
var delta = Math.abs(end.getTime() - start.getTime());
15+
expect(delta).toBeGreaterThan(450);
16+
});
1717
});

0 commit comments

Comments
 (0)