From 65bfb84346e834cfd77d59e89ca2025d479b5b84 Mon Sep 17 00:00:00 2001 From: Joshua May Date: Tue, 13 Apr 2021 00:36:08 +0200 Subject: [PATCH] Fixed test, broke build --- test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.ts b/test.ts index edb8733..1041644 100644 --- a/test.ts +++ b/test.ts @@ -239,7 +239,7 @@ test('prototype support', t => { test('.decorator()', t => { class TestClass { - index = 0; + constructor(public index: number) {} @mem.decorator() counter() { @@ -247,12 +247,12 @@ test('.decorator()', t => { } } - const alpha = new TestClass(); + const alpha = new TestClass(0); t.is(alpha.counter(), 1); t.is(alpha.counter(), 1, 'The method should be memoized'); - const beta = new TestClass(); - t.is(beta.counter(), 1, 'The method should not be memoized across instances'); + const beta = new TestClass(100); + t.is(beta.counter(), 101, 'The method should not be memoized across instances'); }); test('mem.clear() throws when called with a plain function', t => {