mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-08 04:22:09 +00:00
* [tests] Use `turbo` for unit tests * . * . * Revert "." This reverts commit 3d6204fef3fda3c7b4bf08955a186fe806d7c597. * Add "src/util/constants.ts" to outputs * . * Add `@vercel/node-bridge` outputs * . * Mac and Windows * . * Node 14 * . * . * Add templates to CLI output * Run only selected test files * Add cross platform testing * make test paths relative and have minimum per chunk * add install arg * update shell * bump cache key * use backslashes on windows * pass tests as arg * update script name * update turbo config * forward turbo args correctly * dont use backslashes * chunk integration tests instead * update env * separate static-build tests * ensure unit test turbo cache is saved * ensure turbo cache is saved for dev/cli * fix cache key and update timeout * Increase static-build unit test timeout * Leverage turbo remote caching instead of actions/cache * apply suggestions and test chunking itself * update other ci jobs * fix test collecting Co-authored-by: Nathan Rajlich <n@n8.io>
19 lines
730 B
JavaScript
Vendored
19 lines
730 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(2, files)).toEqual([['/first', '/second'], ['/third']]);
|
|
});
|
|
|
|
it('should split chunks correctly more chunks than items', () => {
|
|
const files = ['/first', '/second', '/third'];
|
|
expect(intoChunks(5, files)).toEqual([['/first'], ['/second'], ['/third']]);
|
|
});
|
|
|
|
it('should split chunks correctly equal chunks with items', () => {
|
|
const files = ['/first', '/second', '/third'];
|
|
expect(intoChunks(3, files)).toEqual([['/first'], ['/second'], ['/third']]);
|
|
});
|
|
});
|