Skip to content

Commit

Permalink
Add coffeelint step in testing. Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
cybertk authored and galkin committed Mar 14, 2016
1 parent 029a579 commit 75cbd39
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ module.exports = (grunt) ->
options:
nospawn: true

coffeelint:
default:
src: [
'Gruntfile.coffee'
'src/**/*.coffee'
'test/**/*.coffee'
]
options: {
configFile: 'coffeelint.json'
}

coffeecov:
compile:
src: 'lib'
Expand Down Expand Up @@ -53,6 +64,7 @@ module.exports = (grunt) ->
]

grunt.registerTask "test", [
"coffeelint"
"coffeecov"
"mochaTest"
"uploadCoverage"
Expand Down
7 changes: 7 additions & 0 deletions coffeelint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"max_line_length": {
"value": 120,
"level": "error",
"limitComments": true
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"grunt": "~0.4.5",
"grunt-cli": "~0.1.13",
"grunt-coffeecov": "^0.1.5",
"grunt-coffeelint": "^0.0.15",
"grunt-contrib-watch": "~1.0.0",
"grunt-mocha-test": "~0.12.7",
"grunt-shell": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/abao-test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Abao = proxyquire '../../', {
}

should = chai.should()
chai.use(sinonChai);
chai.use(sinonChai)


describe 'Abao', ->
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test-runner-test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SERVER = 'http://localhost:3000'

assert = chai.assert
should = chai.should()
chai.use(sinonChai);
chai.use(sinonChai)

runner = null

Expand Down Expand Up @@ -170,7 +170,7 @@ describe 'Test Runner', ->

runner = new TestRunner options
sinon.stub test, 'run', (callback) ->
callback()
callback()

# Mute stdout/stderr
mute (unmute) ->
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test-test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proxyquire = require('proxyquire').noCallThru()

assert = chai.assert
should = chai.should()
chai.use(sinonChai);
chai.use(sinonChai)

requestStub = sinon.stub()
requestStub.restore = () ->
Expand Down

0 comments on commit 75cbd39

Please sign in to comment.