Skip to content

Commit

Permalink
Tests that need adjustments #33 add regex to strings/intro
Browse files Browse the repository at this point in the history
  • Loading branch information
m7medVision committed Mar 6, 2024
1 parent 76161de commit 0d1d35b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions testcases/strings/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ function handleCodeRun(code) {
}

const output = handleCodeRun(code);
// const regex = /(let|const|var)\s+\w+\s*=\s*('|`|')\w+(`|'|")/;
// if (regex.test(code)) {
// console.log("You have declared a variable with a string value");
// }
const regex = /(let|const|var)\s+\w+\s*=/;
if (regex.test(code)) {
if (output == "Ich Bin Yazan\nI am Yazan") {
isPass = true;
} else {
isPass = false;
msg = "The output is not correct";
}
}

if (output == "Ich Bin Yazan\nI am Yazan") {
isPass = true;
} else {
isPass = false;
msg = "The output is not correct";
}

0 comments on commit 0d1d35b

Please sign in to comment.