Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
update jest
Browse files Browse the repository at this point in the history
  • Loading branch information
goya committed Aug 22, 2018
1 parent 005185d commit f24d9c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
'<rootDir>/test/_helpers/globals.js',
'jest-plugin-fs/setup'
],
testURL: 'http://localhost',
timers: 'fake',
coverageThreshold: {
global: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"jest": "^22.4.0",
"jest": "^23.5.0",
"jest-plugin-fs": "^2.9.0",
"mock-stdin": "^0.3.1",
"pkg": "^4.3.0",
Expand Down
6 changes: 3 additions & 3 deletions test/commands/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ describe('login', () => {
pgb.api.addAuth = jest.fn(() => true)

pgb.session.load = jest.fn(() => { return { authtoken: 'abcd' } })
prompt
jest.clearAllMocks()
prompt.mockReset()
.mockResolvedValueOnce('[email protected]')
.mockResolvedValueOnce('password')
jest.clearAllMocks()
})

afterAll(() => {
Expand All @@ -27,7 +27,7 @@ describe('login', () => {
.then(command)
.then(() => {
expect(pgb.print).toBeCalledWith({'bare': 12, 'json': {'email': '[email protected]', 'id': 12}, 'pretty': 'signed in as [email protected]'})
expect(pgb.api.me).toBeCalledWith()
expect(pgb.api.me).toBeCalled()
expect(prompt).not.toBeCalled()
})
})
Expand Down

0 comments on commit f24d9c8

Please sign in to comment.