Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix: remove service status from reports
Browse files Browse the repository at this point in the history
  • Loading branch information
justinemmanuelmercado committed Jun 10, 2020
1 parent 3ec82a1 commit dcdecf2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
5 changes: 0 additions & 5 deletions src/sections/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { boolean, Codec, GetInterface, Left, number, optional, string } from 'pu
import { ParsingError } from '../error'
import { HttpClient, RequestMeta, Resource } from '../http'
import { ensureString, mwsDate, NextToken, nextToken as nextTokenCodec } from '../parsing'
import { getServiceStatusByResource } from './shared'

const REPORTS_API_VERSION = '2009-01-01'
/**
Expand Down Expand Up @@ -404,8 +403,4 @@ export class Reports {
},
})
}

async getServiceStatus() {
return getServiceStatusByResource(this.httpClient, Resource.Report, REPORTS_API_VERSION)
}
}
18 changes: 0 additions & 18 deletions test/unit/reports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,4 @@ describe('reports', () => {
)
})
})

describe('getServiceStatus', () => {
it('returns a parsed model when the status response is valid', async () => {
expect.assertions(1)

const mockMwsServiceStatus = createMockHttpClient('get_service_status')

expect(await mockMwsServiceStatus.reports.getServiceStatus()).toMatchSnapshot()
})

it('throws a parsing error when the status response is not valid', async () => {
expect.assertions(1)

await expect(() => mockMwsFail.reports.getServiceStatus()).rejects.toStrictEqual(
new ParsingError(parsingError),
)
})
})
})

0 comments on commit dcdecf2

Please sign in to comment.