mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
formatting
This commit is contained in:
parent
e4b97bf6ba
commit
9b4bbbf71b
@ -1,10 +1,10 @@
|
||||
/*global describe: true, expect: true, it: true */
|
||||
describe("jsdoc/src/filter", function() {
|
||||
/*global describe, expect, it */
|
||||
describe('jsdoc/src/filter', function() {
|
||||
var path = require('jsdoc/path');
|
||||
|
||||
var filter = new (require('jsdoc/src/filter').Filter)({
|
||||
includePattern: new RegExp(".+\\.js(doc)?$"),
|
||||
excludePattern: new RegExp("(^|\\/|\\\\)_"),
|
||||
includePattern: new RegExp('.+\\.js(doc)?$'),
|
||||
excludePattern: new RegExp('(^|\\/|\\\\)_'),
|
||||
exclude: ['.ignore', 'scratch/conf.js']
|
||||
});
|
||||
|
||||
@ -20,9 +20,9 @@ describe("jsdoc/src/filter", function() {
|
||||
return filter.isIncluded($);
|
||||
});
|
||||
|
||||
it("should return the correct source files", function() {
|
||||
it('should return the correct source files', function() {
|
||||
expect(files.length).toEqual(2);
|
||||
expect(files.indexOf("yes.js")).toBeGreaterThan(-1);
|
||||
expect(files.indexOf("/yes.jsdoc")).toBeGreaterThan(-1);
|
||||
expect( files.indexOf('yes.js') ).toBeGreaterThan(-1);
|
||||
expect( files.indexOf('/yes.jsdoc') ).toBeGreaterThan(-1);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/*global describe: true, env: true, expect: true, it: true */
|
||||
describe("jsdoc/src/scanner", function() {
|
||||
var path = require('path');
|
||||
/*global describe, env, expect, it */
|
||||
describe('jsdoc/src/scanner', function() {
|
||||
var path = require('jsdoc/path');
|
||||
|
||||
var filter = new (require('jsdoc/src/filter').Filter)({
|
||||
includePattern: new RegExp(".+\\.js(doc)?$"),
|
||||
excludePattern: new RegExp("(^|\\/|\\\\)_")
|
||||
includePattern: new RegExp('.+\\.js(doc)?$'),
|
||||
excludePattern: new RegExp('(^|\\/|\\\\)_')
|
||||
});
|
||||
var scanner = new (require('jsdoc/src/scanner').Scanner)();
|
||||
var sourcePath = path.normalize(env.pwd + '/test/fixtures/src');
|
||||
@ -14,10 +14,13 @@ describe("jsdoc/src/scanner", function() {
|
||||
return path.relative(env.pwd, $);
|
||||
});
|
||||
|
||||
it("should return the correct source files", function() {
|
||||
it('should return the correct source files', function() {
|
||||
expect(sourceFiles.length).toEqual(3);
|
||||
expect(sourceFiles.indexOf(path.join('test', 'fixtures', 'src', 'one.js'))).toBeGreaterThan(-1);
|
||||
expect(sourceFiles.indexOf(path.join('test', 'fixtures', 'src', 'two.js'))).toBeGreaterThan(-1);
|
||||
expect(sourceFiles.indexOf(path.join('test', 'fixtures', 'src', 'dir1', 'three.js'))).toBeGreaterThan(-1);
|
||||
expect( sourceFiles.indexOf(path.join('test', 'fixtures', 'src', 'one.js')) )
|
||||
.toBeGreaterThan(-1);
|
||||
expect( sourceFiles.indexOf(path.join('test', 'fixtures', 'src', 'two.js')) )
|
||||
.toBeGreaterThan(-1);
|
||||
expect( sourceFiles.indexOf(path.join('test', 'fixtures', 'src', 'dir1', 'three.js')) )
|
||||
.toBeGreaterThan(-1);
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user