Skip to content

Commit

Permalink
Merge branch 'tabatha/dnt-new-lines-2' of https://github.com/newrelic…
Browse files Browse the repository at this point in the history
…/docs-website into tabatha/dnt-new-lines-2
  • Loading branch information
clarkmcadoo committed Apr 25, 2024
2 parents f37c46c + a00f8dd commit 3ae5f0f
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions scripts/actions/__esm-tests__/fetch-and-deserialize.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,23 @@ test('should not copy directories that dont have images', () => {
expect(copySync.callCount).toEqual(0);
});

// TODO: make this work for uvu
// it.each`
// inputSize | batchSize | numberOfBatches
// ${0} | ${2} | ${0}
// ${1} | ${2} | ${1}
// ${2} | ${2} | ${1}
// ${11} | ${3} | ${4}
// `(
// "should create '$numberofBatches' when input size is '$inputSize' and batch size is '$batchSize'",
// ({ inputSize, batchSize, numberOfBatches }) => {
// const batches = createFileUriBatches(
// { fileUris: Array(inputSize) },
// batchSize
// );
test('should created correct number of batches', () => {
const expected = [
{ inputSize: 0, batchSize: 2, numberOfBatches: 0 },
{ inputSize: 1, batchSize: 2, numberOfBatches: 1 },
{ inputSize: 2, batchSize: 2, numberOfBatches: 1 },
{ inputSize: 11, batchSize: 3, numberOfBatches: 4 },
];

// expect(batches).toHaveLength(numberOfBatches);
// }
// );
expected.forEach(({ inputSize, batchSize, numberOfBatches }) => {
const batches = createFileUriBatches(
{ fileUris: Array(inputSize) },
batchSize
);

expect(batches).toHaveLength(numberOfBatches);
});
});

test('splits batches with correct content', () => {
/**
Expand Down

0 comments on commit 3ae5f0f

Please sign in to comment.