Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(bundle): coverage for cargo presence check #51

Open
lowlighter opened this issue May 31, 2024 · 0 comments
Open

test(bundle): coverage for cargo presence check #51

lowlighter opened this issue May 31, 2024 · 0 comments

Comments

@lowlighter
Copy link
Owner

There are missing coverage about the branch that check whether cargo is installed or not on the machine.

We essentially need to find a way to throw Deno.errors.NotFound when spawning cargo, but couldn't find a way to make it work (in Windows at least) to "remove" cargo from path, even passing the env var as empty had no effect

test("deno")("bundle() throws when cargo is not installed", async () => {
  await expect(bundle(project, { autoinstall: false, loglevel: 0, env: { PATH: "" } })).not.resolves.toThrow()
}, { permissions: { read: true, run: true } })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant