diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-01 11:03:15 -0300 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-01 11:03:15 -0300 |
commit | eacd49cf7240b6a4660767950e9974ce064ce18c (patch) | |
tree | e05c5582fd623b66bb929604fec3f20af7606f04 | |
parent | 16e88c670bb7db17e98f292eda9afa98ad07682b (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.js | 4 |
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); |