UNPKG

sort-scripts

Version:

Sort a map of scripts in a logical order

16 lines (13 loc) 379 B
const sortScripts = require('./index.js'); describe('sortScripts', () => { it('sorts based on prefix and suffix', () => { const scripts = { test: 'jest', pretest: 'check-engines', postmerge: 'lint-staged', docs: 'markdown-magic', postdocs: 'echo "\'.md\' files updated"', }; expect(sortScripts(scripts)).toMatchSnapshot(); }); });