Skip to content

Commit 2536e2b

Browse files
Joshua GrossoJoshua Grosso
Joshua Grosso
authored and
Joshua Grosso
committed
Fix spawnHelper tests (post-rebase)
1 parent deedc94 commit 2536e2b

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

src/commands/checkout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function checkout(repo, callback) {
7474
}
7575

7676
return response;
77-
}, errorCatchHandler(response));
77+
}, errorCatchHandler);
7878
}
7979

8080
export default checkout;

src/constants.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export const regex = {
1313
USERNAME: /username/g,
1414
PASSWORD: /password/g,
1515
PASSPHRASE: /passphrase/g,
16-
PERMISSION_DENIED: /permission\s+denied\s+\(.+\)\./g,
16+
PERMISSION_DENIED: /permission\s+denied\s+\(.+\)\./g
1717
};
1818

1919
export const promptTypes = {
2020
USERNAME: 'username',
2121
PASSWORD: 'password',
22-
PASSPHRASE: 'passphrase',
22+
PASSPHRASE: 'passphrase'
2323
};
2424

2525
export const BAD_VERSION = '0';

src/helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import path from 'path';
33
import R from 'ramda';
44

55
import {
6-
LFS_ATTRIBUTE,
76
BAD_CORE_RESPONSE,
87
BAD_REGEX_PARSE_RESULT,
9-
regex,
8+
LFS_ATTRIBUTE,
9+
regex
1010
} from './constants';
1111
import generateResponse from './utils/generateResponse';
1212

src/utils/spawnHelper.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ const buildSocketPath = () => tmp.dir()
3131
* (
3232
* spawnedProcess: ChildProcess,
3333
* callback: (
34-
* passwordOnly: boolean,
35-
* callback: (usernamePrompt: boolean) =>
34+
* output: string,
35+
* callback: (promptType: string) =>
3636
* (username: string, password: ?string, cancel: boolean) =>
3737
* void
38-
* )
38+
* ) => void
3939
* ),
4040
* reject: Error => Promise<void>
4141
* ) =>
@@ -220,7 +220,7 @@ const spawn = (command, opts = {}, callback) => new Promise(
220220

221221
resolve({
222222
code,
223-
stdout,
223+
stdout
224224
});
225225
});
226226
});

test/tests/utils/spawnHelper.spec.js

-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ describe('spawnHelper', () => {
5858
it('resolves with the correct data on a successful exit', todo);
5959

6060
it('rejects on spawn error', todo);
61-
62-
it('rejects on non-0 exit code', todo);
6361
});
6462

6563
describe('winSpawn', () => {
@@ -111,8 +109,6 @@ describe('spawnHelper', () => {
111109
describe('buildSocket', () => {
112110
it('resolves the calling `Promise` with the correct data on a successful exit', todo);
113111

114-
it('only runs the successful close logic once', todo);
115-
116112
it('calls the close callback when the socket ends', todo);
117113

118114
it('calls the close callback when the socket closes', todo);

0 commit comments

Comments
 (0)