Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use grunt-contrib-qunit to run tests locally #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
language: node_js
node_js:
- '8'
script: npm run $COMMAND
env:
matrix:
- COMMAND=test-browser
global:
- secure: MfDOvcCBF/82crmHtm0nfSFRIyILvKRjfozD5LT/1sAKqXE+YzZPkCX2q5heqFwNl35aQPjrRX+61Jhesl0eBtdUgabDvv+Pm8audoKm+x/OGBTogIJpmys6dk68QmzXoYNo0Dv03I0zk/MSBtGtqY6AvQrayGdNigZiH9SdBes=
- secure: oek18JPwaxFTaztJmXcJz+WRoPVq1WDjEXDh+0bF58jRKca8N/mGGzryy85u+DW/xAI50fsiVoiwB2F99z38lHdzpNC5HL9P6C6bdxNddj1bQmcGRiYXAHk43svPP8qVBfjNkwaf1SGGvdtXk3RCD23S51nzI2rjkyzv5/PEQJA=
- '10'
script: npm test
global:
- secure: MfDOvcCBF/82crmHtm0nfSFRIyILvKRjfozD5LT/1sAKqXE+YzZPkCX2q5heqFwNl35aQPjrRX+61Jhesl0eBtdUgabDvv+Pm8audoKm+x/OGBTogIJpmys6dk68QmzXoYNo0Dv03I0zk/MSBtGtqY6AvQrayGdNigZiH9SdBes=
- secure: oek18JPwaxFTaztJmXcJz+WRoPVq1WDjEXDh+0bF58jRKca8N/mGGzryy85u+DW/xAI50fsiVoiwB2F99z38lHdzpNC5HL9P6C6bdxNddj1bQmcGRiYXAHk43svPP8qVBfjNkwaf1SGGvdtXk3RCD23S51nzI2rjkyzv5/PEQJA=
15 changes: 13 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ module.exports = function(grunt) {
}
}
},
qunit: {
all: {
options: {
urls: ["http://127.0.0.1:8080/test/index.html"],
puppeteer: {
args: ["--no-sandbox"]
}
}
}
},
jshint: {
options: {
jshintrc: "./.jshintrc"
Expand Down Expand Up @@ -103,13 +113,15 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');

// A task to cause Grunt to sit and wait, keeping the test server running
grunt.registerTask("wait", function() {
this.async();
});

grunt.registerTask("test-local", ["build", "connect", "wait"]);
grunt.registerTask("test-local", ["build", "connect", "qunit"]);
grunt.registerTask("test-debug", ["build", "connect", "wait"]);
grunt.registerTask("test-remote", ["build", "connect", "saucelabs-qunit"]);

if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
Expand All @@ -119,5 +131,4 @@ module.exports = function(grunt) {
}

grunt.registerTask("build", ["browserify", "uglify"]);
grunt.registerTask("default", ["jshint", "build"]);
};
Loading