Skip to content

Commit

Permalink
test: type casts toBe
Browse files Browse the repository at this point in the history
  • Loading branch information
moltar authored and nguyentoanit committed Apr 20, 2020
1 parent 51e2ed5 commit 293250e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { OperationProvider } from '../../../src/operations/operation-provider'
import { SponsoredProductsAdGroupOperation } from '../../../src/operations/ad-groups/sponsored-products-ad-group-operation'
import { httpClientFactory } from '../../http-client-factory'
import { AdGroupState, AdGroupServingStatusEnum } from '../../../src/operations/ad-groups/types'
import {
AdGroupState,
AdGroupResponseStatus,
AdGroupServingStatusEnum,
} from '../../../src/operations/ad-groups/types'

describe('SponsoredProductsAdGroupOperation', () => {
const client = httpClientFactory()
Expand Down Expand Up @@ -80,7 +84,7 @@ describe('SponsoredProductsAdGroupOperation', () => {
expect.assertions(2)

const res = await adGroupOperation.archiveAdGroup(ARCHIVED_AD_GROUP_ID)
expect(res.code).toBe('SUCCESS')
expect(res.code).toBe<AdGroupResponseStatus>('SUCCESS')

if (res.code === 'SUCCESS') {
expect(res.adGroupId).toBe(ARCHIVED_AD_GROUP_ID)
Expand Down

0 comments on commit 293250e

Please sign in to comment.