mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
tests for doclets with Markdown asterisks
This commit is contained in:
parent
7c0d72415d
commit
e59dc9023a
23
test/fixtures/doclet.js
vendored
Normal file
23
test/fixtures/doclet.js
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
Markdown asterisks in a doclet that does not use leading asterisks.
|
||||||
|
**Strong** is strong.
|
||||||
|
|
||||||
|
* List item 1.
|
||||||
|
* List item 2.
|
||||||
|
@param {string} thingy - The thingy.
|
||||||
|
*/
|
||||||
|
function test1(thingy) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Markdown asterisks in a doclet that uses leading asterisks.
|
||||||
|
* **Strong** is strong.
|
||||||
|
*
|
||||||
|
* * List item 1.
|
||||||
|
* * List item 2.
|
||||||
|
* @param {string} thingy - The thingy.
|
||||||
|
*/
|
||||||
|
function test2(thingy) {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,3 +1,22 @@
|
|||||||
|
/*global describe: true, env: true, expect: true, it: true, jasmine: true, xit: true */
|
||||||
describe("jsdoc/doclet", function() {
|
describe("jsdoc/doclet", function() {
|
||||||
//TODO
|
// TODO: more tests
|
||||||
});
|
|
||||||
|
var docSet = jasmine.getDocSetFromFile('test/fixtures/doclet.js'),
|
||||||
|
test1 = docSet.getByLongname('test1')[0],
|
||||||
|
test2 = docSet.getByLongname('test2')[0];
|
||||||
|
|
||||||
|
var expectStrong = "**Strong** is strong";
|
||||||
|
var expectList = "* List item 1";
|
||||||
|
|
||||||
|
// TODO: reenable the test and make it pass, or remove the test
|
||||||
|
xit('does not mangle Markdown in a description that does not use leading asterisks', function() {
|
||||||
|
expect(test1.description.indexOf(expectStrong)).toBeGreaterThan(-1);
|
||||||
|
expect(test1.description.indexOf(expectList)).toBeGreaterThan(-1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not mangle Markdown in a description that uses leading asterisks', function() {
|
||||||
|
expect(test2.description.indexOf(expectStrong)).toBeGreaterThan(-1);
|
||||||
|
expect(test2.description.indexOf(expectList)).toBeGreaterThan(-1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user