MetaMask / snaps-cli

A CLI for developing MetaMask plugins.
ISC License
37 stars 26 forks source link

Manifest Command Unit Tests #94

Closed astarinmymind closed 3 years ago

astarinmymind commented 3 years ago

One line in logManifestError is not covered because it is never called by manifest.ts . This is because the error parameter is optional and it is never used throughout the program.

astarinmymind commented 3 years ago

Now you're cooking with gas! 😄

One general comment in addition to the inline: would it be possible to spy on e.g. logManifestWarning and logManifestError instead console.warn and console.error? This is a genuine question; we don't want to do that at the expense of too much extra work.

This is because logManifestWarning and logManifestError are internal functions. SpyOn is used to mock functions from other modules.

rekmarks commented 3 years ago

This is because logManifestWarning and logManifestError are internal functions. SpyOn is used to mock functions from other modules.

Oh, I thought they were in a different file. That's fine then, let's just keep things as they are!