Skip to content

Commit 30b795a

Browse files
committed
test: fix failing tests
1 parent bdec2fb commit 30b795a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/create-project.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ test("with index file", async () => {
2222
const project = createProject({ indexFilePath: "./index.ts", cwd: dir });
2323
expect(project.isOk()).toBe(true);
2424
expect(
25-
project._unsafeUnwrap().sourceFiles.map((sf) => sf.getBaseName()),
25+
project
26+
._unsafeUnwrap()
27+
.project.getSourceFiles()
28+
.map((sf) => sf.getBaseName()),
2629
).toStrictEqual(["index.ts"]);
2730
});
2831
});
@@ -34,7 +37,10 @@ test("with index file and other file", async () => {
3437
const project = createProject({ indexFilePath: "./index.ts", cwd: dir });
3538
expect(project.isOk()).toBe(true);
3639
expect(
37-
project._unsafeUnwrap().sourceFiles.map((sf) => sf.getBaseName()),
40+
project
41+
._unsafeUnwrap()
42+
.project.getSourceFiles()
43+
.map((sf) => sf.getBaseName()),
3844
).toStrictEqual(["index.ts", "other.ts"]);
3945
});
4046
});

src/errors.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,13 @@ import { expect, test } from "vitest";
22
import {
33
FsError,
44
InstallPackageError,
5-
OsError,
65
PackageDeclarationsError,
76
PackageJsonError,
87
PackageNameError,
98
PackageTypesError,
109
ProjectError,
1110
} from "./errors";
1211

13-
test("os error", () => {
14-
expect(() => {
15-
throw new OsError("test");
16-
}).toThrow();
17-
});
18-
1912
test("fs error", () => {
2013
expect(() => {
2114
throw new FsError("test");

0 commit comments

Comments
 (0)