multi-clasp2
Version:
Google Clasp wrapper to push changes to multiple Apps Script projects at once.
15 lines (14 loc) • 858 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const mutli_clasp_errors_1 = require("../src/mutli-clasp-errors");
const run_1 = require("../src/run");
describe('run.ts tests', () => {
test('wrong inputs', () => {
expect(() => ((0, run_1.getRunClaspArgs)("", { nondev: false, params: '' }))).toThrow(mutli_clasp_errors_1.MultiClaspErrors.InvalidJson);
});
test('good inputs', () => {
expect((0, run_1.getRunClaspArgs)("testFunc", { nondev: false, params: '[]' })).toBe("testFunc --params '[]'");
expect((0, run_1.getRunClaspArgs)("testFunc", { nondev: false, params: '["dino"]' })).toBe("testFunc --params '[\"dino\"]'");
expect((0, run_1.getRunClaspArgs)("testFunc", { nondev: true, params: '["dino", "pepe"]' })).toBe("testFunc --nondev --params '[\"dino\",\"pepe\"]'");
});
});