@@ -83,7 +83,7 @@ describe('getDeviceId', function () {
83
83
expect ( resultA ) . to . equal ( resultB ) ;
84
84
} ) ;
85
85
86
- it ( 'handles timeout when getting machine id' , async ( ) => {
86
+ it ( 'handles timeout when getting machine id' , async function ( ) {
87
87
let timeoutId : NodeJS . Timeout ;
88
88
const getMachineId = ( ) =>
89
89
new Promise < string > ( ( resolve ) => {
@@ -100,11 +100,13 @@ describe('getDeviceId', function () {
100
100
timeout : 1 ,
101
101
} ) . value ;
102
102
103
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
103
104
clearTimeout ( timeoutId ! ) ;
104
105
expect ( result ) . to . equal ( 'unknown' ) ;
106
+ expect ( errorCalled ) . to . equal ( false ) ;
105
107
} ) ;
106
108
107
- it ( 'handles external promise resolution' , async ( ) => {
109
+ it ( 'handles external promise resolution' , async function ( ) {
108
110
let timeoutId : NodeJS . Timeout ;
109
111
const getMachineId = ( ) =>
110
112
new Promise < string > ( ( resolve ) => {
@@ -120,13 +122,14 @@ describe('getDeviceId', function () {
120
122
121
123
const result = await value ;
122
124
125
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
123
126
clearTimeout ( timeoutId ! ) ;
124
127
expect ( result ) . to . be . a ( 'string' ) ;
125
128
expect ( result ) . to . equal ( 'external-id' ) ;
126
129
expect ( result ) . to . not . equal ( 'unknown' ) ;
127
130
} ) ;
128
131
129
- it ( 'handles external promise rejection' , async ( ) => {
132
+ it ( 'handles external promise rejection' , async function ( ) {
130
133
let timeoutId : NodeJS . Timeout ;
131
134
const getMachineId = ( ) =>
132
135
new Promise < string > ( ( resolve ) => {
@@ -142,6 +145,7 @@ describe('getDeviceId', function () {
142
145
143
146
reject ( error ) ;
144
147
148
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
145
149
clearTimeout ( timeoutId ! ) ;
146
150
try {
147
151
await value ;
0 commit comments