feat(client): parse test 'text' as markdown (#39176)
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
f77005cc43
commit
0e1dca5924
@ -19,6 +19,10 @@
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.test-output p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.test-status-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -5,7 +5,7 @@ Object {
|
||||
"tests": Array [
|
||||
Object {
|
||||
"testString": "assert.isTrue((/hello(\\\\s)+world/gi).test($('h1').text()), 'Your <code>h1</code> element should have the text \\"Hello World\\".');",
|
||||
"text": "Your <code>h1</code> element should have the text \\"Hello World\\".",
|
||||
"text": "<p>Your <code>h1</code> element should have the text \\"Hello World\\".</p>",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
@ -34,6 +34,12 @@ function plugin() {
|
||||
);
|
||||
tests.question.text = mdToHTML(tests.question.text);
|
||||
}
|
||||
if (tests.tests) {
|
||||
tests.tests = tests.tests.map(({ text, testString }) => ({
|
||||
text: mdToHTML(text),
|
||||
testString
|
||||
}));
|
||||
}
|
||||
file.data = {
|
||||
...file.data,
|
||||
...tests
|
||||
|
Reference in New Issue
Block a user