We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent159369f commit60f28fdCopy full SHA for 60f28fd
test.js
@@ -28,6 +28,34 @@ test('memoize with multiple non-primitive arguments', t => {
28
t.is(memoized({foo:true},{bar:false},{baz:true}),2);
29
});
30
31
+test.failing('memoize with regexp arguments',t=>{
32
+leti=0;
33
+constmemoized=m(()=>i++);
34
+t.is(memoized(),0);
35
36
+t.is(memoized(/SindreSorhus/),1);
37
38
+t.is(memoized(/ElvinPeng/),2);
39
40
+});
41
+
42
+test.failing('memoize with Symbol arguments',t=>{
43
44
+constarg1=Symbol('fixture1');
45
+constarg2=Symbol('fixture2');
46
47
48
49
+t.is(memoized(arg1),1);
50
51
+t.is(memoized(arg2),2);
52
53
+t.is(memoized({foo:arg1}),3);
54
55
+t.is(memoized({foo:arg2}),4);
56
57
58
59
test('maxAge option',asynct=>{
60
leti=0;
61
constf=()=>i++;