UNPKG

bonsai-analyzer

Version:
28 lines (24 loc) 725 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _defaults = require("../../__test_helpers__/defaults"); var _getEntryChunks = _interopRequireDefault(require("../getEntryChunks")); const stats = { chunks: [(0, _defaults.defaultChunk)({ id: 0, names: ['chunk-zero'] }), (0, _defaults.defaultChunk)({ id: 1, names: ['chunk-one'], parents: [0, 1] }), (0, _defaults.defaultChunk)({ id: 2, names: ['chunk-two'] })] }; describe('getEntryChunks', () => { it('should list all the chunks', () => { const result = (0, _getEntryChunks.default)(stats); expect(result).toHaveLength(3); expect(result).toMatchSnapshot(); }); });