Additional performance tests (#1512)

This commit is contained in:
Jaco
2022-06-03 18:53:57 +03:00
committed by GitHub
parent ca6a4177b5
commit e946243b6f
2 changed files with 20 additions and 5 deletions
+4 -1
View File
@@ -1,7 +1,8 @@
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { arrayChunk } from '.';
import { performance } from '../test/performance';
import { arrayChunk, arrayRange } from '.';
describe('arrayChunk', (): void => {
it('chunks arrays', (): void => {
@@ -9,4 +10,6 @@ describe('arrayChunk', (): void => {
arrayChunk([1, 2, 3, 4, 5, 6, 7], 3)
).toEqual([[1, 2, 3], [4, 5, 6], [7]]);
});
performance('arrayChunk', 200_000, [[arrayRange(500), 50]], arrayChunk);
});