mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-24 02:07:00 +08:00
chore(tools): Ignore white space in challenge id testing (#59382)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
co-authored by
Oliver Eyton-Williams
parent
db2adaee3d
commit
4161577bb5
@@ -208,9 +208,11 @@ async function setup() {
|
||||
}
|
||||
|
||||
if (process.env.FCC_CHALLENGE_ID) {
|
||||
console.log(`\nChallenge Id being tested: ${process.env.FCC_CHALLENGE_ID}`);
|
||||
console.log(
|
||||
`\nChallenge Id being tested: ${process.env.FCC_CHALLENGE_ID.trim()}`
|
||||
);
|
||||
const challengeIndex = challenges.findIndex(
|
||||
challenge => challenge.id === process.env.FCC_CHALLENGE_ID
|
||||
challenge => challenge.id === process.env.FCC_CHALLENGE_ID.trim()
|
||||
);
|
||||
if (challengeIndex === -1) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user