Skip to content

Commit

Permalink
test: fix broken e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradeVanti committed Nov 1, 2024
1 parent 77c56f4 commit 117ddb2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .github/verdaccio/com.example.demo/v1.0.0/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions .github/verdaccio/com.example.demo/v2.0.0/package.json

This file was deleted.

4 changes: 4 additions & 0 deletions .github/verdaccio/com.unity.mathematics/v1.0.0/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "com.unity.mathematics",
"version": "1.0.0"
}
12 changes: 7 additions & 5 deletions test/e2e/add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getProjectManifest } from "./check/project-manifest";
import { runOpenupm } from "./run";
import { prepareHomeDirectory } from "./setup/directories";
import { prepareUnityProject } from "./setup/project";
import { testRegistryUrl as e2eTestRegistryUrl } from "./setup/test-registry";

describe("add packages", () => {
type SuccessfulAddCase = {
Expand Down Expand Up @@ -298,13 +299,14 @@ describe("add packages", () => {
await testSuccessfulAdd(
[
{
packageName: "jp.keijiro.metamesh",
addVersion: "1.2.0",
expectedVersion: "1.2.0",
// The test registry contains the package, but not this version so it should fallback to the Unity registry.
packageName: "com.unity.mathematics",
addVersion: "1.2.1",
expectedVersion: "1.2.1",
},
],
["jp.keijiro.metamesh"],
RegistryUrl.parse("https://registry.npmjs.com")
[],
e2eTestRegistryUrl
);
});
});
6 changes: 6 additions & 0 deletions test/e2e/setup/test-registry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { RegistryUrl } from "../../../src/domain/registry-url";

/**
* Registry url of the local e2e test package registry.
*/
export const testRegistryUrl = RegistryUrl.parse("http://localhost:4873");

0 comments on commit 117ddb2

Please sign in to comment.