Skip to content

Commit

Permalink
Fix test (#48)
Browse files Browse the repository at this point in the history
`nix flake metadata` (without a ref) works and resolves to the flake in
$PWD. Use a non-empty non-existing ref instead.
  • Loading branch information
Trundle authored Nov 8, 2024
1 parent 41b66ea commit ff0e9fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion __tests__/nix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test("getFlakeLockedUrl works", async () => {
test("getFlakeLockedUrl fails for invalid flake", async () => {
jest.spyOn(nix, "getFlakeLockedUrl");

await expect(() => nix.getFlakeLockedUrl("")).rejects.toThrow(
await expect(() => nix.getFlakeLockedUrl("doesnotexist")).rejects.toThrow(
/The process '\/.*?\/nix' failed with exit code 1/
);
expect(nix.getFlakeLockedUrl).toBeCalledTimes(1);
Expand Down

0 comments on commit ff0e9fe

Please sign in to comment.