-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathls.test.ts
28 lines (25 loc) · 1.04 KB
/
ls.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { ResultCodes } from "../../src/cli/result-codes";
import { buildProjectManifest } from "../common/data-project-manifest";
import { runOpenupm } from "./run";
import { prepareHomeDirectory } from "./setup/directories";
import { prepareUnityProject } from "./setup/project";
describe("list installed packages", () => {
test("should list installed packages", async () => {
const homeDirectory = await prepareHomeDirectory();
const projectDirectory = await prepareUnityProject(homeDirectory, {
manifest: buildProjectManifest((manifest) =>
manifest
.addDependency("dev.comradevanti.opt-unity", "2.0.0", true, true)
.addDependency("com.unity.ugui", "1.0.0", true, false)
),
});
const result = await runOpenupm(projectDirectory, ["ls"]);
expect(result.code).toEqual(ResultCodes.Ok);
expect(result.stdErr).toEqual(
expect.arrayContaining([
expect.stringContaining("dev.comradevanti.opt-unity@2.0.0"),
expect.stringContaining("com.unity.ugui@1.0.0"),
])
);
});
});