Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Commit f24d9c8

Browse files
committed
update jest
1 parent 005185d commit f24d9c8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
'<rootDir>/test/_helpers/globals.js',
99
'jest-plugin-fs/setup'
1010
],
11+
testURL: 'http://localhost',
1112
timers: 'fake',
1213
coverageThreshold: {
1314
global: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"eslint-plugin-node": "^6.0.1",
4848
"eslint-plugin-promise": "^3.6.0",
4949
"eslint-plugin-standard": "^3.0.1",
50-
"jest": "^22.4.0",
50+
"jest": "^23.5.0",
5151
"jest-plugin-fs": "^2.9.0",
5252
"mock-stdin": "^0.3.1",
5353
"pkg": "^4.3.0",

test/commands/login.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ describe('login', () => {
1111
pgb.api.addAuth = jest.fn(() => true)
1212

1313
pgb.session.load = jest.fn(() => { return { authtoken: 'abcd' } })
14-
prompt
14+
jest.clearAllMocks()
15+
prompt.mockReset()
1516
.mockResolvedValueOnce('user@example.com')
1617
.mockResolvedValueOnce('password')
17-
jest.clearAllMocks()
1818
})
1919

2020
afterAll(() => {
@@ -27,7 +27,7 @@ describe('login', () => {
2727
.then(command)
2828
.then(() => {
2929
expect(pgb.print).toBeCalledWith({'bare': 12, 'json': {'email': 'user@example.com', 'id': 12}, 'pretty': 'signed in as user@example.com'})
30-
expect(pgb.api.me).toBeCalledWith()
30+
expect(pgb.api.me).toBeCalled()
3131
expect(prompt).not.toBeCalled()
3232
})
3333
})

0 commit comments

Comments
 (0)