Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit ec6009b

Browse files
committed
Unit test for PR #10024
1 parent be1f56d commit ec6009b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/spec/EventDispatcher-test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ define(function (require, exports, module) {
145145
expect(fn4).not.toHaveBeenCalled();
146146
});
147147

148+
it("should detach by .namespace when no listeners present (and still chain)", function () {
149+
dispatcher.off(".1").on("foo.1", fn1);
150+
dispatcher.trigger("foo");
151+
expect(fn1).toHaveBeenCalled();
152+
});
148153

149154
it("should no-op detach by event alone when no handlers for any event", function () {
150155
dispatcher.off("foo"); // shouldn't throw

0 commit comments

Comments
 (0)