Add assertion messages for function invocation

This commit is contained in:
Mike Pennisi 2016-04-25 16:32:47 -04:00
parent 0d09ea91d9
commit 8c6b1320de
15 changed files with 15 additions and 15 deletions

View File

@ -45,4 +45,4 @@ f = (/*{ elems }*/) => {
}; };
f(/*{ vals }*/); f(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'arrow function invoked exactly once');

View File

@ -68,4 +68,4 @@ class C {
}; };
C.method(/*{ vals }*/).next(); C.method(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -68,4 +68,4 @@ class C {
}; };
new C().method(/*{ vals }*/).next(); new C().method(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -66,4 +66,4 @@ class C {
}; };
C.method(/*{ vals }*/); C.method(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -66,4 +66,4 @@ class C {
}; };
new C().method(/*{ vals }*/); new C().method(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -70,4 +70,4 @@ var C = class {
}; };
C.method(/*{ vals }*/).next(); C.method(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -70,4 +70,4 @@ var C = class {
}; };
new C().method(/*{ vals }*/).next(); new C().method(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -67,4 +67,4 @@ var C = class {
}; };
C.method(/*{ vals }*/); C.method(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -67,4 +67,4 @@ var C = class {
}; };
new C().method(/*{ vals }*/); new C().method(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');

View File

@ -45,4 +45,4 @@ function f(/*{ elems }*/) {
callCount = callCount + 1; callCount = callCount + 1;
}; };
f(/*{ vals }*/); f(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'function invoked exactly once');

View File

@ -46,4 +46,4 @@ f = function(/*{ elems }*/) {
}; };
f(/*{ vals }*/); f(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'function invoked exactly once');

View File

@ -44,4 +44,4 @@ function* f(/*{ elems }*/) {
callCount = callCount + 1; callCount = callCount + 1;
}; };
f(/*{ vals }*/).next(); f(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'generator function invoked exactly once');

View File

@ -46,4 +46,4 @@ f = function*(/*{ elems }*/) {
}; };
f(/*{ vals }*/).next(); f(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'generator function invoked exactly once');

View File

@ -52,4 +52,4 @@ var obj = {
}; };
obj.method(/*{ vals }*/).next(); obj.method(/*{ vals }*/).next();
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'generator method invoked exactly once');

View File

@ -49,4 +49,4 @@ var obj = {
}; };
obj.method(/*{ vals }*/); obj.method(/*{ vals }*/);
assert.sameValue(callCount, 1); assert.sameValue(callCount, 1, 'method invoked exactly once');