UNPKG

@the-goat/core

Version:

![npm version](https://badgen.net/npm/v/@the-goat/goat?icon=npm) ![npm downloads](https://badgen.net/npm/dt/@the-goat/goat?icon=npm) ![npm weekly downloads](https://badgen.net/npm/dw/@the-goat/goat?icon=npm) ![npm licence](https://badgen.net/npm/license/@

24 lines (21 loc) 724 B
const upgrade = require('./upgrade-1-4-0'); test('Get the global config', async () => { const beforeConfig = { goatVersion: '1.4.0', functions: [ '@the-goat/task-styles', '@the-goat/task-babel', '@the-goat/task-eslint', '@the-goat/task-modernizr', ], }; const config = upgrade(beforeConfig); expect(typeof config.modules).toBe('object'); expect(config.goatVersion).toBe(beforeConfig.goatVersion); expect(config.modules.length).toBe(beforeConfig.functions.length); config.modules.forEach((module) => { expect(module).toHaveProperty('name'); expect(module).toHaveProperty('package'); expect(beforeConfig.functions.includes(module.package)).toBe(true); }); });