summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test-utils/MockRest.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/test-utils/MockRest.js')
-rw-r--r--openecomp-ui/test-utils/MockRest.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/openecomp-ui/test-utils/MockRest.js b/openecomp-ui/test-utils/MockRest.js
index c49d53d984..6cc676a2bb 100644
--- a/openecomp-ui/test-utils/MockRest.js
+++ b/openecomp-ui/test-utils/MockRest.js
@@ -76,5 +76,19 @@ export default {
resetQueue() {
initQueue();
+ },
+
+ checkEmptyQueue() {
+ let isEmpty = true;
+ let message = 'Check following calls: ';
+ for (let operationType in queue) {
+ if (queue[operationType].length > 0) {
+ isEmpty = false;
+ message += operationType;
+ }
+ }
+ if (!isEmpty) {
+ throw new Error('Queue is not empty, ' + message);
+ }
}
};