Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("creates command shim to an executable file", done => {
const src = path.resolve("./packages/package-2/cli.js");
const dst = path.resolve("./packages/package-1/node_modules/.bin/package-2");
const type = "exec";
cmdShim.mockImplementation(callsBack());
FileSystemUtilities.symlink(src, dst, type, () => {
try {
expect(fs.lstat).not.toBeCalled();
expect(cmdShim).lastCalledWith(src, dst, expect.any(Function));
done();
} catch (ex) {
done.fail(ex);
}
});
});