UNPKG

boats

Version:

Beautiful Open / Async Template System - Write less yaml with BOATS and Nunjucks.

30 lines (29 loc) 873 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const commander_collect_1 = tslib_1.__importDefault(require("../commander.collect")); test('add bob=bob and expect as object in arr', () => { expect((0, commander_collect_1.default)('bob=bob', [])).toEqual([ { bob: 'bob', }, ]); }); test('add bob and expect as object in arr bob is true', () => { expect((0, commander_collect_1.default)('bob', [])).toEqual([ { bob: true, }, ]); }); test('add bob=bob and bob and expect array of objects', () => { const response = (0, commander_collect_1.default)('bob', []); expect((0, commander_collect_1.default)('bob=bob', response)).toEqual([ { bob: true, }, { bob: 'bob', }, ]); });