Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("calls rimraf CLI with arguments", done => {
pathExists.mockImplementation(() => Promise.resolve(true));
FileSystemUtilities.rimraf("rimraf/test", () => {
try {
expect(ChildProcessUtilities.spawn).lastCalledWith(
process.execPath,
[require.resolve("rimraf/bin"), "--no-glob", path.normalize("rimraf/test/")],
{},
expect.any(Function)
);
done();
} catch (ex) {
done.fail(ex);
}
});
});