Skip to content

Commit c564d96

Browse files
committed
Test that the config actually loads
1 parent 5033436 commit c564d96

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/index.spec.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe("TypeScriptLoader", () => {
77

88
describe("exports", () => {
99
it("should export the loader function as a default", () => {
10-
expect(typeof TypeScriptLoader).toBe("function");
10+
expect(typeof TypeScriptLoader).toStrictEqual("function");
1111
});
1212
});
1313

@@ -22,7 +22,9 @@ describe("TypeScriptLoader", () => {
2222
path.resolve(fixturesPath, "valid.fixture.ts")
2323
);
2424

25-
expect(typeof loadedCfg?.config).toBe("object");
25+
expect(typeof loadedCfg!.config).toStrictEqual("object");
26+
expect(typeof loadedCfg!.config.test).toStrictEqual("object");
27+
expect(loadedCfg!.config.test.cake).toStrictEqual("a lie");
2628
});
2729

2830
it("should throw an error on loading an invalid TS file", async () => {
@@ -52,7 +54,9 @@ describe("TypeScriptLoader", () => {
5254
path.resolve(fixturesPath, "valid.fixture.ts")
5355
);
5456

55-
expect(typeof loadedCfg?.config).toBe("object");
57+
expect(typeof loadedCfg!.config).toStrictEqual("object");
58+
expect(typeof loadedCfg!.config.test).toStrictEqual("object");
59+
expect(loadedCfg!.config.test.cake).toStrictEqual("a lie");
5660
});
5761

5862
it("should throw an error on loading an invalid TS file", () => {

0 commit comments

Comments
 (0)