« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--test/lib/generic-mock.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/generic-mock.js b/test/lib/generic-mock.js
index 2a346448..119f8731 100644
--- a/test/lib/generic-mock.js
+++ b/test/lib/generic-mock.js
@@ -219,7 +219,7 @@ export function mockFunction(...args) {
         } else if (expectedCallCount === 1) {
           topLevelErrors.push(new Error(`Expected 1 call, got ${totalCallCount}`));
         } else {
-          topLevelErrors.push(new Error(`Unexpectedly called at all`));
+          topLevelErrors.push(new Error(`Expected no calls, got ${totalCallCount}`));
         }
       }
 
@@ -246,7 +246,7 @@ export function mockFunction(...args) {
     // No further processing, this indicates the function shouldn't have been
     // called at all and there aren't any descriptions to match this call with.
     if (empty(allCallDescriptions)) {
-      return;
+      return newCallDescription();
     }
 
     const currentCallNumber = runningCallCount;