WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

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

@lowlighter

Description

@lowlighter

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 } })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions