Skip to content

Commit

Permalink
feat(napi): update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickersoft committed Nov 23, 2024
1 parent bcebc36 commit 0eec345
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim pnpm --filter="@odict/node" test
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim sh -c "npm install -g pnpm && pnpm --filter=\"@odict/node\" test"
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine pnpm --filter="@odict/node" test
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine sh -c "npm install -g pnpm && pnpm --filter=\"@odict/node\" test"
test-linux-aarch64-gnu-binding:
name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
needs:
Expand Down
9 changes: 5 additions & 4 deletions bindings/node/tests/dictionary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ describe("Dictionary", () => {
});

it("returns the path correctly", () => {
expect(dict1.path).toBe(dict1Path.replace(".xml", ".odict"));
expect(dict2.path).toBe(dict2Path.replace(".xml", ".odict"));
// Needs toContain instead of toBe seeing Windows paths start with \\?\
expect(dict1.path).toContain(dict1Path.replace(".xml", ".odict"));
expect(dict2.path).toContain(dict2Path.replace(".xml", ".odict"));
});

describe("lookup", () => {
Expand Down Expand Up @@ -100,8 +101,8 @@ describe("Dictionary", () => {
const dict = new Dictionary("fake-alias");
await dict.lookup("dog");
} catch (e) {
expect((e as Error).message).toEqual(
"No such file or directory (os error 2)"
expect((e as Error).message).toContain(
"(os error 2)"
);
}
});
Expand Down

0 comments on commit 0eec345

Please sign in to comment.