File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ describe("SlotTest", () => {
6969 assert . deepEqual ( received , expected ) ;
7070 } ) ;
7171
72+ it ( "execute0_with_once_enabled_should_remove_listener" , ( ) => {
73+ expected = [ ] ;
74+ slot = new Slot ( listener0 , signal , true ) ;
75+ slot . execute0 ( ) ;
76+ assert . deepEqual ( received , expected ) ;
77+ } ) ;
78+
7279 it ( "execute1_should_not_call_listener_when_disabled" , ( ) => {
7380 slot = new Slot ( listener1 , signal ) ;
7481 slot . enabled = false ;
@@ -100,6 +107,13 @@ describe("SlotTest", () => {
100107 assert . deepEqual ( received , expected ) ;
101108 } ) ;
102109
110+ it ( "execute1_with_once_enabled_should_remove_listener" , ( ) => {
111+ expected = [ 42 ] ;
112+ slot = new Slot ( listener1 , signal , true ) ;
113+ slot . execute1 ( expected [ 0 ] ) ;
114+ assert . deepEqual ( received , expected ) ;
115+ } ) ;
116+
103117 it ( "execute_should_not_call_listener_when_disabled" , ( ) => {
104118 slot = new Slot ( listener0 , signal ) ;
105119 slot . enabled = false ;
You can’t perform that action at this time.
0 commit comments