Skip to content

Commit

Permalink
fix upperFirst in tell-me-who and tell-me-vip
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoussat committed Mar 11, 2021
1 parent cfaa830 commit 72f0d8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
rust/**/target/
js/soluss
4 changes: 2 additions & 2 deletions js/tests/tell-me-vip_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ tests.push(async ({ randStr, eq, ctx }) => {
return eq('', data)
})

tests.push(async ({ randStr, eq, ctx }) => {
const random = randStr()
tests.push(async ({ randStr, eq, ctx, upperFirst }) => {
const random = upperFirst(randStr())
const files = [
['Ubaid_Ballard.json', { answer: 'yes' }],
['Victoria_Chan.json', { answer: 'yes' }],
Expand Down
4 changes: 2 additions & 2 deletions js/tests/tell-me-who_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const setup = async ({ path }) => {
return { tmpPath: dir, run, createFilesIn }
}

tests.push(async ({ eq, ctx, randStr }) => {
const random = randStr()
tests.push(async ({ eq, ctx, randStr, upperFirst }) => {
const random = upperFirst(randStr())
const fileNames = [
'Ubaid_Ballard.json',
'Victoria_Chan.json',
Expand Down
3 changes: 2 additions & 1 deletion js/tests/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ const runTests = async ({ url, path, code }) => {
max || (max = min, min = 0)
return Math.floor(Math.random() * (max - min) + min)
}
const upperFirst = (str) => str[0].toUpperCase() + str.slice(1)

const tools = { eq, fail, wait, code, path, randStr, between }
const tools = { eq, fail, wait, code, path, randStr, between, upperFirst }
tools.ctx = (await (setup && setup(tools))) || {}
for (const [i, t] of tests.entries()) {
try {
Expand Down

0 comments on commit 72f0d8a

Please sign in to comment.