Skip to content

Commit

Permalink
add coveralls to check test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
outsideris committed Sep 5, 2014
1 parent 1bd02a4 commit 197ff67
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
@@ -0,0 +1 @@
repo_token: gGcwhFfO9aBa3D6dTPyHb9nC4XhSFVPQm
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,3 +9,4 @@ tmp/
.settings/

examples/components/
coverage/
21 changes: 17 additions & 4 deletions Gruntfile.js
Expand Up @@ -25,13 +25,17 @@ module.exports = function(grunt) {
},
watch: {},
karma: {
'summernote': {
options: {
configFile: './test/karma.conf.js'
},
'summernote': { },
travis: {
singleRun: true,
configFile: './test/karma.conf.js',
browsers: ['PhantomJS']
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
preprocessors: { '../**/src/**/*.js': 'coverage' },
coverageReporter: { type: "lcov", dir: "../coverage/" },
plugins: [ 'karma-*' ]
}
},
uglify: {
Expand All @@ -48,6 +52,15 @@ module.exports = function(grunt) {
'dist/angular-summernote.min.js': ['src/angular-summernote.js']
}
}
},
coveralls: {
options: {
debug: true,
coverage_dir: 'coverage',
dryRun: false,
force: true,
recursive: true
}
}
});

Expand All @@ -59,7 +72,7 @@ module.exports = function(grunt) {
// Default task.
grunt.registerTask('default', []);
grunt.registerTask('test', ['karma:summernote']);
grunt.registerTask('travis', ['karma:travis']);
grunt.registerTask('travis', ['karma:travis', 'coveralls']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('deploy', ['uglify:deploy']);
};
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -5,6 +5,7 @@
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
[![Build Status](https://travis-ci.org/outsideris/angular-summernote.png?branch=master)](https://travis-ci.org/outsideris/angular-summernote)
[![Dependency Status](https://gemnasium.com/outsideris/angular-summernote.png)](https://gemnasium.com/outsideris/angular-summernote)
[![Coverage Status](https://coveralls.io/repos/outsideris/angular-summernote/badge.png)](https://coveralls.io/r/outsideris/angular-summernote)

angular-summernote is just a directive to bind summmernote's all features.
You can use summernote with angular way.
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -30,7 +30,9 @@
"karma": "~0.12.23",
"karma-mocha": "~0.1.1",
"grunt-karma": "~0.8.3",
"grunt-contrib-uglify": "~0.5.1"
"grunt-contrib-uglify": "~0.5.1",
"grunt-karma-coveralls": "^2.5.1",
"karma-coverage": "^0.2.6"
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion test/angular-summernote.test.js
Expand Up @@ -311,7 +311,7 @@ describe('Summernote directive', function() {
el.next().remove();
el.remove();
done();
}, 100);
}, 200);
});
});

Expand Down

0 comments on commit 197ff67

Please sign in to comment.