diff options
author | carson <carson@leaddyno.com> | 2020-05-14 13:56:34 -0700 |
---|---|---|
committer | carson <carson@leaddyno.com> | 2020-05-14 13:56:34 -0700 |
commit | 51bf9bfc139ce2faff70fa48faf50fe56343ed75 (patch) | |
tree | 36330eaa4af524d7529b8f8ca12fd76af41f7acb /test/attributes/kt-push-url.js | |
parent | 53cd87465c46d7165fc02a19135e4329ff15af91 (diff) | |
download | htmx-51bf9bfc139ce2faff70fa48faf50fe56343ed75.tar.gz htmx-51bf9bfc139ce2faff70fa48faf50fe56343ed75.zip |
perf test
Diffstat (limited to 'test/attributes/kt-push-url.js')
-rw-r--r-- | test/attributes/kt-push-url.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/attributes/kt-push-url.js b/test/attributes/kt-push-url.js index c1763e2b..a5fa2368 100644 --- a/test/attributes/kt-push-url.js +++ b/test/attributes/kt-push-url.js @@ -110,10 +110,14 @@ describe("kt-push-url attribute", function() { for (var i = 0; i < 10; i++) { array.push(entry); } + var start = performance.now(); var string = JSON.stringify(array); localStorage.setItem(KUTTY_HISTORY_CACHE, string); var reReadString = localStorage.getItem(KUTTY_HISTORY_CACHE); var finalJson = JSON.parse(reReadString); + var end = performance.now(); + var timeInMs = end - start; + chai.assert(timeInMs < 300, "Should take less than 300ms on most platforms"); }) });
\ No newline at end of file |