@@ -31,13 +31,14 @@ test.afterEach((ctx) => {
3131 removeModules ( [ 'q' ] )
3232} )
3333
34- test ( 'should load tracking metrics' , ( t ) => {
35- const { agent } = t . nr
34+ test ( 'should load tracking metrics' , async ( t ) => {
35+ const { agent, q } = t . nr
3636 const { version } = require ( 'q/package.json' )
37- assertPackageMetrics ( { agent, pkg : 'q' , version } )
37+ await q ( )
38+ assertPackageMetrics ( { agent, pkg : 'q' , version, subscriberType : true } )
3839} )
3940
40- test ( 'q.invoke' , ( t , end ) => {
41+ test ( 'q.invoke' , async ( t ) => {
4142 const { agent, q } = t . nr
4243 const firstTest = q . defer ( )
4344 const secondTest = q . defer ( )
@@ -56,10 +57,10 @@ test('q.invoke', (t, end) => {
5657 } )
5758 } )
5859
59- q . all ( [ firstTest , secondTest ] ) . then ( ( ) => end ( ) )
60+ await q . all ( [ firstTest . promise , secondTest . promise ] )
6061} )
6162
62- test ( 'q.then' , ( t , end ) => {
63+ test ( 'q.then' , async ( t ) => {
6364 const { agent, q } = t . nr
6465 const firstTest = q . defer ( )
6566 const secondTest = q . defer ( )
@@ -78,7 +79,7 @@ test('q.then', (t, end) => {
7879 } )
7980 } )
8081
81- q . all ( [ firstTest , secondTest ] ) . then ( ( ) => end ( ) )
82+ await q . all ( [ firstTest . promise , secondTest . promise ] )
8283} )
8384
8485test ( 'q.then rejections' , async ( t ) => {
0 commit comments