fix(curriculum): return empty string in Reusable Profile Card Component (#60801)

This commit is contained in:
Supravisor
2025-06-19 07:51:17 +12:00
committed by GitHub
parent 6c6d22017b
commit 4dd4f2ef20

View File

@@ -16,7 +16,7 @@ Also, return a pair of parentheses with an empty string inside for now.
# --hints--
You should create and export a `Card` functional component. Don't forget to return an empty string inside it.
You should create and export a `Card` functional component.
```js
assert.isFunction(window.index.Card);
@@ -33,6 +33,15 @@ assert.match(functionDefinition, /\{[^{]*title[^{]*\}/);
assert.match(functionDefinition, /\{[^{]*bio[^{]*\}/);
```
Your `Card` component should return an empty string.
```js
const functionRegex = __helpers.functionRegex("Card", null, { capture: true });
const match = code.match(functionRegex);
const functionDefinition = match[0];
assert.match(functionDefinition, /\s*{\s*return\s*\(\s*(''|""|``)\s*\)\s*}|\s*=>\s*\(\s*(''|""|``)\s*\)/);
```
# --seed--
## --seed-contents--