Skip to content

Commit

Permalink
Fix spawnHelper tests (post-rebase)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Grosso authored and Joshua Grosso committed Sep 6, 2017
1 parent deedc94 commit 2536e2b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/commands/checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function checkout(repo, callback) {
}

return response;
}, errorCatchHandler(response));
}, errorCatchHandler);
}

export default checkout;
4 changes: 2 additions & 2 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export const regex = {
USERNAME: /username/g,
PASSWORD: /password/g,
PASSPHRASE: /passphrase/g,
PERMISSION_DENIED: /permission\s+denied\s+\(.+\)\./g,
PERMISSION_DENIED: /permission\s+denied\s+\(.+\)\./g
};

export const promptTypes = {
USERNAME: 'username',
PASSWORD: 'password',
PASSPHRASE: 'passphrase',
PASSPHRASE: 'passphrase'
};

export const BAD_VERSION = '0';
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import path from 'path';
import R from 'ramda';

import {
LFS_ATTRIBUTE,
BAD_CORE_RESPONSE,
BAD_REGEX_PARSE_RESULT,
regex,
LFS_ATTRIBUTE,
regex
} from './constants';
import generateResponse from './utils/generateResponse';

Expand Down
8 changes: 4 additions & 4 deletions src/utils/spawnHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const buildSocketPath = () => tmp.dir()
* (
* spawnedProcess: ChildProcess,
* callback: (
* passwordOnly: boolean,
* callback: (usernamePrompt: boolean) =>
* output: string,
* callback: (promptType: string) =>
* (username: string, password: ?string, cancel: boolean) =>
* void
* )
* ) => void
* ),
* reject: Error => Promise<void>
* ) =>
Expand Down Expand Up @@ -220,7 +220,7 @@ const spawn = (command, opts = {}, callback) => new Promise(

resolve({
code,
stdout,
stdout
});
});
});
Expand Down
4 changes: 0 additions & 4 deletions test/tests/utils/spawnHelper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ describe('spawnHelper', () => {
it('resolves with the correct data on a successful exit', todo);

it('rejects on spawn error', todo);

it('rejects on non-0 exit code', todo);
});

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

it('only runs the successful close logic once', todo);

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

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

0 comments on commit 2536e2b

Please sign in to comment.