Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 562786c

Browse files
committed
Remove unused variables, test flakes that should be addressed
1 parent 7d5869f commit 562786c

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

test/git-prompt-server.test.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('GitPromptServer', function() {
4141
async function runCredentialScript(command, queryHandler, processHandler) {
4242
await server.start(queryHandler);
4343

44-
return new Promise((resolve, reject) => {
44+
return new Promise(resolve => {
4545
const child = execFile(
4646
getAtomHelperPath(), [tempDir.getCredentialHelperJs(), server.getAddress(), command],
4747
{env: electronEnv},
@@ -72,7 +72,6 @@ describe('GitPromptServer', function() {
7272
});
7373

7474
it('prompts for user input and writes collected credentials to stdout', async function() {
75-
this.retries(5); // Known Flake
7675
this.timeout(10000);
7776

7877
let queried = null;
@@ -108,7 +107,6 @@ describe('GitPromptServer', function() {
108107

109108
it('preserves a provided username', async function() {
110109
this.timeout(10000);
111-
this.retries(5);
112110

113111
let queried = null;
114112

@@ -142,7 +140,6 @@ describe('GitPromptServer', function() {
142140

143141
it('parses input without the terminating blank line', async function() {
144142
this.timeout(10000);
145-
this.retries(5);
146143

147144
function queryHandler(query) {
148145
return {
@@ -169,9 +166,8 @@ describe('GitPromptServer', function() {
169166

170167
it('creates a flag file if remember is set to true', async function() {
171168
this.timeout(10000);
172-
this.retries(5);
173169

174-
function queryHandler(query) {
170+
function queryHandler() {
175171
return {
176172
username: 'old-man-from-scene-24',
177173
password: 'Green. I mean blue! AAAhhhh...',
@@ -192,7 +188,6 @@ describe('GitPromptServer', function() {
192188

193189
it('uses matching credentials from keytar if available without prompting', async function() {
194190
this.timeout(10000);
195-
this.retries(5);
196191

197192
let called = false;
198193
function queryHandler() {
@@ -230,7 +225,6 @@ describe('GitPromptServer', function() {
230225

231226
it('uses a default username for the appropriate host if one is available', async function() {
232227
this.timeout(10000);
233-
this.retries(5);
234228

235229
let called = false;
236230
function queryHandler() {
@@ -273,7 +267,6 @@ describe('GitPromptServer', function() {
273267

274268
it('uses credentials from the GitHub tab if available', async function() {
275269
this.timeout(10000);
276-
this.retries(5);
277270

278271
let called = false;
279272
function queryHandler() {
@@ -307,7 +300,6 @@ describe('GitPromptServer', function() {
307300

308301
it('stores credentials in keytar if a flag file is present', async function() {
309302
this.timeout(10000);
310-
this.retries(5);
311303

312304
let called = false;
313305
function queryHandler() {
@@ -341,7 +333,6 @@ describe('GitPromptServer', function() {
341333

342334
it('forgets stored credentials from keytar if authentication fails', async function() {
343335
this.timeout(10000);
344-
this.retries(5);
345336

346337
function queryHandler() {
347338
return {};
@@ -387,7 +378,6 @@ describe('GitPromptServer', function() {
387378
describe('askpass helper', function() {
388379
it('prompts for user input and writes the response to stdout', async function() {
389380
this.timeout(10000);
390-
this.retries(5);
391381

392382
let queried = null;
393383

@@ -400,7 +390,7 @@ describe('GitPromptServer', function() {
400390
});
401391

402392
let err, stdout;
403-
await new Promise((resolve, reject) => {
393+
await new Promise(resolve => {
404394
const child = execFile(
405395
getAtomHelperPath(), [tempDir.getAskPassJs(), server.getAddress(), 'Please enter your password for "updog"'],
406396
{env: electronEnv},

0 commit comments

Comments
 (0)