Skip to content

Commit

Permalink
fix(edit unit test): edit unit test
Browse files Browse the repository at this point in the history
edit unit test
  • Loading branch information
septk committed May 5, 2019
1 parent eb78618 commit e7495a2
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions test/devices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,4 @@ describe('Devices Test', () => {
const devices = new Devices({} as any)
expect(devices instanceof Devices).toBeTruthy()
})

describe('getDeviceInfo() call', () => {
it('should return device obj', async () => {
nock(API_CONFIG.baseURL)
.get(`/devices/9E1F98`)
.reply(200)
const devices = new Devices({} as any)
const result = await devices.getDeviceInfo('9E1F98')
expect(result).toMatchSnapshot()
})

it('should return error', async () => {
const devices = new Devices({} as any)
try {
nock(API_CONFIG.baseURL)
.get(`/devices/9E1F98`)
.reply(404)
await devices.getDeviceInfo('9E1F98')
} catch (error) {
expect(error).toMatchSnapshot()
}
})
})
})

0 comments on commit e7495a2

Please sign in to comment.