You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current test bed does not reflect the specifications in their entirety. Creating one test at a time is not a viable way forward (see #1124 & #1129).
Use the spec JSON to generate test files. Thinking the following makes the most sense for readability and whatnot.
Template:
// [flavor short name]_[section].jsit('should pass [flavor short name] example [example number]',function(){varresult=marked([specmarkdown]);varexpected=[spechtml];expected(result).toBe(expected);}
Live example:
// cm_list_items.jsit('should pass cm example 230',function(){varresult=marked(0.ok\n);varexpected='<ol start=\"0\">\n<li>ok</li>\n</ol>\n';expected(result).toBe(expected);}it('should pass cm example 234',function(){varresult=marked(' 10. foo\n\n bar\n');varexpected='<ol start=\"10\">\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n</li>\n</ol>\n';expected(result).toBe(expected);}
Activity
joshbruce commentedon Mar 24, 2018
Why one complete test case per example?
Allows for marking individual examples as "not gonna do it" or "this one doesn't work" - just comment out the test and make a note re status.