From aa616f1c62a884c704882f53c0255a5f53a9830a Mon Sep 17 00:00:00 2001 From: Sergei Zharinov <zharinov@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:04:59 -0300 Subject: [PATCH] test: Fix timing tests for `Cacheable` class (#31561) --- lib/util/cache/package/cacheable.spec.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/util/cache/package/cacheable.spec.ts b/lib/util/cache/package/cacheable.spec.ts index 8c19c1fcd1..f8486ef69b 100644 --- a/lib/util/cache/package/cacheable.spec.ts +++ b/lib/util/cache/package/cacheable.spec.ts @@ -98,24 +98,24 @@ describe('util/cache/package/cacheable', () => { const t1 = new Date(); const empty = Cacheable.empty(); + const a = empty.asPrivate(42); + const b = empty.asPublic(42); const t2 = new Date(); - const a = Cacheable.fromPrivate(42); - const b = Cacheable.fromPublic(42); - const c = empty.asPrivate(42); - const d = empty.asPublic(42); + const c = Cacheable.fromPrivate(42); + const d = Cacheable.fromPublic(42); const t3 = new Date(); expect(dateOf(empty)).toBeAfterOrEqualTo(t1); expect(dateOf(empty)).toBeBeforeOrEqualTo(t2); - expect(dateOf(a)).toBeAfterOrEqualTo(t2); - expect(dateOf(a)).toBeBeforeOrEqualTo(t3); + expect(dateOf(a)).toBeAfterOrEqualTo(t1); + expect(dateOf(a)).toBeBeforeOrEqualTo(t2); - expect(dateOf(b)).toBeAfterOrEqualTo(t2); - expect(dateOf(b)).toBeBeforeOrEqualTo(t3); + expect(dateOf(b)).toBeAfterOrEqualTo(t1); + expect(dateOf(b)).toBeBeforeOrEqualTo(t2); expect(dateOf(c)).toBeAfterOrEqualTo(t2); expect(dateOf(c)).toBeBeforeOrEqualTo(t3); -- GitLab