From f85073bebeb6b08afcc5c9ec74e75c099e9e4a4e Mon Sep 17 00:00:00 2001 From: Revone Date: Wed, 11 Oct 2023 22:30:53 +0800 Subject: [PATCH] [test] Double the duration of the performance test. --- package.json | 2 +- .../unit/data-structures/linked-list/doubly-linked-list.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6f3beb7..20f6d09 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "fix:src": "npm run lint:src && npm run format:src", "fix:test": "npm run lint:test && npm run format:test", "fix": "npm run fix:src && npm run fix:test", - "update:test-deps": "npm i avl-tree-typed binary-tree-typed bst-typed heap-typed --save-dev", + "update:individuals": "npm i avl-tree-typed binary-tree-typed bst-typed heap-typed --save-dev", "install:individuals": "npm i avl-tree-typed binary-tree-typed bst-typed deque-typed directed-graph-typed doubly-linked-list-typed graph-typed heap-typed linked-list-typed max-heap-typed max-priority-queue-typed min-heap-typed min-priority-queue-typed priority-queue-typed singly-linked-list-typed stack-typed tree-multiset-typed trie-typed undirected-graph-typed queue-typed --save-dev", "test": "jest", "check:deps": "dependency-cruiser src", diff --git a/test/unit/data-structures/linked-list/doubly-linked-list.test.ts b/test/unit/data-structures/linked-list/doubly-linked-list.test.ts index dec1eaa..eab2ad5 100644 --- a/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +++ b/test/unit/data-structures/linked-list/doubly-linked-list.test.ts @@ -349,7 +349,7 @@ describe('DoublyLinkedList Performance Test', () => { for (let i = 0; i < magnitude.LINEAR; i++) { list.unshift(i); } - expect(performance.now() - startPushTime).toBeLessThan(bigO.LINEAR * 10); + expect(performance.now() - startPushTime).toBeLessThan(bigO.LINEAR * 20); expect(list.length).toBeGreaterThan(0); const startPopTime = performance.now();