fix(curriculum): update test regex to allow whitespaces (#47150)

* Added spacing fix to catch end of line spaces

* allow for spaces before "("
This commit is contained in:
hanswang123456
2022-08-08 07:37:49 -04:00
committed by GitHub
parent 41e85ef2bb
commit 87f0f75d9e

View File

@@ -33,7 +33,7 @@ Your promise should receive a function with `resolve` and `reject` as parameters
```js
assert(
code.match(
/Promise\(\s*(function\s*\(\s*resolve\s*,\s*reject\s*\)\s*{|\(\s*resolve\s*,\s*reject\s*\)\s*=>\s*{)[^}]*}/g
/Promise\s*\(\s*(function\s*\(\s*resolve\s*,\s*reject\s*\)\s*{|\(\s*resolve\s*,\s*reject\s*\)\s*=>\s*{)[^}]*}/g
)
);
```