summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-10-01 11:03:15 -0300
committerDuda Dornelles <ddornell@thoughtworks.com>2014-10-01 11:03:15 -0300
commiteacd49cf7240b6a4660767950e9974ce064ce18c (patch)
treee05c5582fd623b66bb929604fec3f20af7606f04
parent16e88c670bb7db17e98f292eda9afa98ad07682b (diff)
Fixing "flaky" js tests: when spying on teardown and not calling it through we were ending up with a component in memory that was blowing up the next tests
-rw-r--r--web-ui/test/spec/tags/ui/tag_shortcut.spec.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web-ui/test/spec/tags/ui/tag_shortcut.spec.js b/web-ui/test/spec/tags/ui/tag_shortcut.spec.js
index ba44304e..862e0d1c 100644
--- a/web-ui/test/spec/tags/ui/tag_shortcut.spec.js
+++ b/web-ui/test/spec/tags/ui/tag_shortcut.spec.js
@@ -42,8 +42,8 @@ describeComponent("tags/ui/tag_shortcut", function () {
var shortcutAddedAfterEmptyingParent = TagShortcut.appendedTo(parent, { linkTo: { name: 'inbox', counts: { total: 15 }}, trigger: component });
// by now shorcut is not in the DOM anymore but shortcutAddedAfterEmptyingParent is
- spyOn(shortcut, 'teardown');
- spyOn(shortcutAddedAfterEmptyingParent, 'teardown');
+ spyOn(shortcut, 'teardown').andCallThrough();
+ spyOn(shortcutAddedAfterEmptyingParent, 'teardown').andCallThrough();
$(document).trigger(Pixelated.events.tags.shortcuts.teardown);