Skip to content

Commit 9e9cf96

Browse files
committed
Reduce fetch delay for more responsive display
Seems to work alright and not getting rate limited
1 parent 9f12d78 commit 9e9cf96

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

prompts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const searchEvents = function(answers, input) {
8383
}
8484

8585
export async function selectEvent () {
86-
await setup({ cheerio, useFixtures: process.env.test });
86+
await setup({ cheerio, requestDelay: 500, useFixtures: process.env.test });
8787

8888
return inquirer.prompt({
8989
message: "what event?",

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const cliPath = __dirname + '/index.js'
1010
process.env.test = true;
1111

1212
test('selectEvent', async assert => {
13-
const result = await run([cliPath], ['CCH Junior Road Race', ENTER], 4000);
13+
const result = await run([cliPath], ['CCH Junior Road Race', ENTER], 1000);
1414
assert.true(new RegExp('CCH Junior', 'g').test(result), result);
1515
});
1616

1717
test('selectRace', async assert => {
18-
const result = await run([cliPath], ['CCH Junior Road Race', ENTER, ENTER], 8000);
18+
const result = await run([cliPath], ['CCH Junior Road Race', ENTER, ENTER], 1000);
1919
assert.true(new RegExp('Craig Adams', 'g').test(result), result);
2020
});

0 commit comments

Comments
 (0)