mirror of https://github.com/01-edu/public.git
fix upperFirst in tell-me-who and tell-me-vip
This commit is contained in:
parent
cfaa8308ca
commit
72f0d8a763
|
@ -1,2 +1,3 @@
|
||||||
node_modules
|
node_modules
|
||||||
rust/**/target/
|
rust/**/target/
|
||||||
|
js/soluss
|
||||||
|
|
|
@ -58,8 +58,8 @@ tests.push(async ({ randStr, eq, ctx }) => {
|
||||||
return eq('', data)
|
return eq('', data)
|
||||||
})
|
})
|
||||||
|
|
||||||
tests.push(async ({ randStr, eq, ctx }) => {
|
tests.push(async ({ randStr, eq, ctx, upperFirst }) => {
|
||||||
const random = randStr()
|
const random = upperFirst(randStr())
|
||||||
const files = [
|
const files = [
|
||||||
['Ubaid_Ballard.json', { answer: 'yes' }],
|
['Ubaid_Ballard.json', { answer: 'yes' }],
|
||||||
['Victoria_Chan.json', { answer: 'yes' }],
|
['Victoria_Chan.json', { answer: 'yes' }],
|
||||||
|
|
|
@ -28,8 +28,8 @@ export const setup = async ({ path }) => {
|
||||||
return { tmpPath: dir, run, createFilesIn }
|
return { tmpPath: dir, run, createFilesIn }
|
||||||
}
|
}
|
||||||
|
|
||||||
tests.push(async ({ eq, ctx, randStr }) => {
|
tests.push(async ({ eq, ctx, randStr, upperFirst }) => {
|
||||||
const random = randStr()
|
const random = upperFirst(randStr())
|
||||||
const fileNames = [
|
const fileNames = [
|
||||||
'Ubaid_Ballard.json',
|
'Ubaid_Ballard.json',
|
||||||
'Victoria_Chan.json',
|
'Victoria_Chan.json',
|
||||||
|
|
|
@ -96,8 +96,9 @@ const runTests = async ({ url, path, code }) => {
|
||||||
max || (max = min, min = 0)
|
max || (max = min, min = 0)
|
||||||
return Math.floor(Math.random() * (max - min) + min)
|
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))) || {}
|
tools.ctx = (await (setup && setup(tools))) || {}
|
||||||
for (const [i, t] of tests.entries()) {
|
for (const [i, t] of tests.entries()) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue