Skip to content

Commit

Permalink
fix failing tests on windows (jsdoc#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
hegemonic committed Jun 23, 2013
1 parent 6b3d96a commit c16f6dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/specs/jsdoc/src/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
describe("jsdoc/src/filter", function() {
var filter = new (require('jsdoc/src/filter').Filter)({
includePattern: new RegExp(".+\\.js(doc)?$"),
excludePattern: new RegExp("(^|\\/)_"),
excludePattern: new RegExp("(^|\\/|\\\\)_"),
exclude: ['.ignore', 'scratch/conf.js']
});

Expand Down
10 changes: 5 additions & 5 deletions test/specs/tags/exampletag.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ describe("@example tag", function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/exampletag.js'),
doc = docSet.getByLongname('x')[0],
doc2 = docSet.getByLongname('y')[0],
txt = 'console.log("foo");\nconsole.log("bar");',
txt2 = '<caption>Example 2</caption>\n1 + 2;';
txtRegExp = new RegExp('console\\.log\\("foo"\\);[\\r\\n]{1,2}console\\.log\\("bar"\\);'),
txt2RegExp = new RegExp('<caption>Example 2</caption>[\\r\\n]{1,2}1 \\+ 2;');

it("creates an 'examples' property on the doclet with the example", function() {
expect(doc.examples).toBeDefined();
expect(Array.isArray(doc.examples)).toBe(true);
expect(doc.examples.length).toBe(1);
expect(doc.examples).toContain(txt);
expect(doc.examples).toMatch(txtRegExp);
});

it("can be specified multiple times on one doclet", function() {
expect(doc2.examples).toBeDefined();
expect(Array.isArray(doc2.examples)).toBe(true);
expect(doc2.examples.length).toBe(2);
expect(doc2.examples).toContain(txt);
expect(doc2.examples).toContain(txt2);
expect(doc2.examples).toMatch(txtRegExp);
expect(doc2.examples).toMatch(txt2RegExp);
});
});

0 comments on commit c16f6dc

Please sign in to comment.