File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ describe('Buttons', () => {
2121 } ) ;
2222
2323 it ( 'should connect to InSim and send a button' , ( done ) => {
24- let root : ReturnType < typeof createRoot > ;
25- let receivedPackets : Buffer [ ] = [ ] ;
26-
2724 const createRootOptions : CreateRootOptions = {
2825 name : 'Test App' ,
2926 host : '127.0.0.1' ,
@@ -32,6 +29,8 @@ describe('Buttons', () => {
3229 prefix : '!' ,
3330 } ;
3431
32+ let root : ReturnType < typeof createRoot > ;
33+
3534 process . nextTick ( ( ) => {
3635 root = createRoot ( createRootOptions ) ;
3736 root . render (
@@ -45,6 +44,8 @@ describe('Buttons', () => {
4544 expect ( opts . host ) . toEqual ( '127.0.0.1' ) ;
4645 expect ( opts . port ) . toEqual ( 29999 ) ;
4746
47+ let receivedPackets : Buffer [ ] = [ ] ;
48+
4849 socket . on ( 'data' , ( data ) => {
4950 receivedPackets . push ( data ) ;
5051 const combined = Buffer . concat ( receivedPackets ) ;
You can’t perform that action at this time.
0 commit comments