This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ before_script: | |
- npm install -g grunt-cli | ||
|
||
script: | ||
- npm run test:lib | ||
- grunt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"env": { | ||
"mocha": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
var expect = require('chai').expect | ||
var initMocha = require('../../lib')['framework:mocha'][1] | ||
|
||
describe('framework:mocha', function () { | ||
var files | ||
|
||
beforeEach(function () { | ||
files = createMockFiles() | ||
}) | ||
|
||
it('should add adapter.js', function () { | ||
initMocha(files) | ||
|
||
expect(files[1].pattern).to.contain('adapter.js') | ||
}) | ||
|
||
it('should add mocha.js', function () { | ||
initMocha(files) | ||
|
||
expect(files[0].pattern).to.contain('mocha.js') | ||
}) | ||
|
||
it('should add required files', function () { | ||
var mochaConfig = {require: ['foo.js']} | ||
|
||
initMocha(files, mochaConfig) | ||
|
||
expect(files[1].pattern).to.contain('foo.js') | ||
}) | ||
|
||
it('should add mocha.css if we define reporter in config', function () { | ||
var mochaConfig = {reporter: 'html'} | ||
|
||
initMocha(files, mochaConfig) | ||
|
||
expect(files[0].pattern).to.contain('mocha.css') | ||
}) | ||
}) | ||
|
||
function createMockFiles () { | ||
return [] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = function () { | ||
return { | ||
files: [ | ||
'lib/**/*@(.js)' | ||
], | ||
|
||
tests: [ | ||
'./test/lib/**/*.spec@(.js)' | ||
], | ||
|
||
env: { | ||
type: 'node' | ||
}, | ||
|
||
testFramework: 'mocha' | ||
} | ||
} |