-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Sebastien Pereira
committed
Sep 2, 2014
1 parent
cafb772
commit 6c6826c
Showing
17 changed files
with
428 additions
and
161 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
language: node_js | ||
node_js: "0.10" | ||
install: "npm -g install jshint@2.4.x" | ||
script: "jshint ." | ||
node_js: | ||
- '0.10' | ||
install: | ||
- npm install -g grunt-cli | ||
- npm -g install bower | ||
- npm install | ||
- bower install | ||
script: | ||
- grunt jshint test:remote | ||
env: | ||
global: | ||
- secure: eY1OxvXmDHrxYoO5hQwcWNptaJClL69aswUw5G+ZNppSEymNCTquYN/MS87iZm76G98o4A0aafM989d5UDhjU187NYdxf6K7jEPwtaxuHi6d48M0LRG/DoAWCNOUoNyNuhpRCVEB7XmwvZOG9nmoRcPvt+KjM5VkiOvp+CluCk0= | ||
- secure: F0RyTrC3kdKomLNbKXJJA1Ju0ZCnB5E7oW7eYwkikLjlfn/4rBkuX4MYJqGBdCIwotpx0k30Wmql7cpYsk9pfM36NIqZoY3bOMITAY/FR8gxiE6zLjFEV/JBdY1hKIeDStsCEPJIRPd27oq4yK1j8dVFel9rI+aENWV1+CZ7o7o= |
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,73 @@ | ||
/* global module */ | ||
module.exports = function (grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON("package.json"), | ||
|
||
jshint: { | ||
src: [ | ||
"**/*.js", "!{node_modules,dev}/**" | ||
], | ||
options: { | ||
jshintrc: ".jshintrc" | ||
} | ||
}, | ||
|
||
intern: { | ||
// run tests on local desktop browser(s) | ||
local: { | ||
options: { | ||
runType: "runner", | ||
config: "tests/intern/local", | ||
reporters: ["runner"] | ||
} | ||
}, | ||
// run tests on remote cloud service | ||
remote: { | ||
options: { | ||
runType: "runner", | ||
config: "tests/intern/saucelab", | ||
reporters: ["runner"] | ||
} | ||
} | ||
} | ||
}); | ||
|
||
// Load plugins | ||
grunt.loadNpmTasks("intern"); | ||
grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
|
||
// Aliases | ||
grunt.registerTask("default", ["jshint"]); | ||
|
||
// Testing. | ||
// always specify the target e.g. grunt test:remote, grunt test:remote | ||
// then add on any other flags afterwards e.g. console, lcovhtml | ||
var testTaskDescription = "Run this task instead of the intern task directly! \n" + | ||
"Always specify the test target e.g. \n" + | ||
"grunt test:local\n" + | ||
"grunt test:local.android\n" + | ||
"grunt test:local.ios\n" + | ||
"grunt test:remote\n\n" + | ||
"Add any optional reporters via a flag e.g. \n" + | ||
"grunt test:local:console\n" + | ||
"grunt test:local:lcovhtml\n" + | ||
"grunt test:local:console:lcovhtml"; | ||
grunt.registerTask("test", testTaskDescription, function (target) { | ||
function addReporter(reporter) { | ||
var property = "intern." + target + ".options.reporters", | ||
value = grunt.config.get(property); | ||
if (value.indexOf(reporter) !== -1) { | ||
return; | ||
} | ||
value.push(reporter); | ||
grunt.config.set(property, value); | ||
} | ||
if (this.flags.lcovhtml) { | ||
addReporter("lcovhtml"); | ||
} | ||
if (this.flags.console) { | ||
addReporter("console"); | ||
} | ||
grunt.task.run("intern:" + target); | ||
}); | ||
}; |
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,18 @@ | ||
{ | ||
"name": "dpointer", | ||
"version": "0.1.1-dev", | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"intern": "1.6.x", | ||
"grunt": "~0.4.2", | ||
"grunt-contrib-jshint": "~0.6.3" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "BSD", | ||
"url": "https://github.com/ibm-js/dpointer/blob/master/LICENSE" | ||
} | ||
], | ||
"bugs": "https://github.com/ibm-js/dpointer/issues" | ||
} |
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,15 @@ | ||
/** | ||
* Utilities for unit tests | ||
*/ | ||
define([], function () { | ||
// avoid failure on IE9: console is not be defined when dev tools is not opened | ||
if (!window.console) { | ||
window.console = {}; | ||
} | ||
if (!window.console.log) { | ||
window.console.log = function () { | ||
}; | ||
} | ||
return this; | ||
} | ||
); |
Oops, something went wrong.