fix(seed): React Challenges showing unwanted brackets (#16595)

Closes #16528
This commit is contained in:
Neenad Ingole
2018-02-06 21:31:33 +05:30
committed by Stuart Taylor
parent e1d5cb6405
commit 183740d739

View File

@ -118,7 +118,8 @@ export function createTests({ tests = [] }) {
.map(test => {
if (typeof test === 'string') {
return {
text: ('' + test).split('message: ').pop().replace(/\'\);/g, ''),
text: ('' + test).split('message: ')
.pop().replace(/(\'\);(\s*\};)?)/g, ''),
testString: test
};
}