From 604502e68fbd43053f209778d8f24449502ed5bf Mon Sep 17 00:00:00 2001 From: Nathaniel Tucker Date: Mon, 18 Dec 2023 20:15:43 +0000 Subject: [PATCH] docs: Update legacy benchmark to properly perform date conversions --- examples/benchmark/old-normalizr/normalizr.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/benchmark/old-normalizr/normalizr.js b/examples/benchmark/old-normalizr/normalizr.js index d9d29c239297..1c906b359b30 100644 --- a/examples/benchmark/old-normalizr/normalizr.js +++ b/examples/benchmark/old-normalizr/normalizr.js @@ -54,7 +54,10 @@ export default function addNormlizrSuite(suite) { }) .add('denormalizeShort donotcache 500x', () => { for (let i = 0; i < 500; ++i) { - denormalize('gnoff', User, githubState.entities); + const user = denormalize('gnoff', User, githubState.entities); + // legacy normalizr doesn't convert this for us, so we must do manually afterward. + user.createdAt = new Date(user.createdAt); + user.updatedAt = new Date(user.updatedAt); } }) .on('complete', function () {