UNPKG

@applicaster/zapplicaster-cli

Version:

CLI Tool for the zapp app and Quick Brick project

24 lines (17 loc) 371 B
const shelljs = jest.genMockFromModule("fs"); function exec(command) { if (command.includes("FAILING_COMMAND")) { return { code: 1, stdErr: "Error" }; } return { code: 0 }; } function mv() { // moving file } function rm() { // removing file } shelljs.exec = jest.fn(exec); shelljs.mv = jest.fn(mv); shelljs.rm = jest.fn(rm); module.exports = shelljs;