Update telemetry test

This commit is contained in:
Greg 2021-10-14 16:11:59 -06:00
parent 8da357f1dc
commit cccf81edf7
1 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
/* eslint-disable jest/no-export, jest/no-disabled-tests */
/**
* Internal dependencies
*/
const { HTTPClientFactory, Coupon } = require( '@woocommerce/api' );
const { HTTPClientFactory } = require( '@woocommerce/api' );
/**
* External dependencies
@ -40,7 +39,7 @@ const runTelemetryAPITest = () => {
const response = await client
.post( `/wc-telemetry/tracker`, data )
.catch( err => {
expect( err.statusCode ).toBe( 400 );
expect( err.code ).toBe( 400 );
} );
expect( response ).toBeUndefined();
@ -53,7 +52,7 @@ const runTelemetryAPITest = () => {
version: '1.0',
})
expect( response.statusCode ).toBe( 200 );
expect( response.code ).toBe( 200 );
} );
} );
};