mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 12:57:46 +00:00
We can separate each package `test-unit` into a separate job. This will help isolate problems and we can re-run CI for a specific package.
30 lines
808 B
JavaScript
Vendored
30 lines
808 B
JavaScript
Vendored
const { intoChunks } = require('./chunk-tests');
|
|
|
|
describe('it should create chunks correctly', () => {
|
|
it('should split chunks correctly less chunks than items', () => {
|
|
const files = ['/first', '/second', '/third'];
|
|
expect(intoChunks(1, 2, files)).toEqual([
|
|
['/first', '/second'],
|
|
['/third'],
|
|
]);
|
|
});
|
|
|
|
it('should split chunks correctly more chunks than items', () => {
|
|
const files = ['/first', '/second', '/third'];
|
|
expect(intoChunks(1, 5, files)).toEqual([
|
|
['/first'],
|
|
['/second'],
|
|
['/third'],
|
|
]);
|
|
});
|
|
|
|
it('should split chunks correctly equal chunks with items', () => {
|
|
const files = ['/first', '/second', '/third'];
|
|
expect(intoChunks(1, 3, files)).toEqual([
|
|
['/first'],
|
|
['/second'],
|
|
['/third'],
|
|
]);
|
|
});
|
|
});
|