-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port unit tests to mocha and chai, add img diff example tests, add de…
…bug playground, setup travis
- Loading branch information
Showing
36 changed files
with
7,692 additions
and
3,623 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
.idea/ | ||
.idea/ | ||
.node_modules/ | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start |
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,31 @@ | ||
"use strict"; | ||
|
||
var gulp = require('gulp'); | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var cheerio = require('cheerio'); | ||
|
||
|
||
function updateExample(filename) { | ||
var playground = fs.readFileSync(path.join(__dirname, filename), {'encoding': 'utf8'}); | ||
var filenames = fs.readdirSync(path.join(__dirname,'test/example')); | ||
var $ = cheerio.load(playground); | ||
var $examples = $('#examples'); | ||
var $select = $('#select'); | ||
$examples.empty(); | ||
$select.empty(); | ||
filenames.forEach(function(filename) { | ||
var name = filename.replace('.js', ''); | ||
$examples.append($('<script type="text/javascript" src="example/'+filename+'"></script>')); | ||
$select.append($('<option value="'+name+'">'+name+'</option>')); | ||
}); | ||
fs.writeFileSync(path.join(__dirname, filename), $.html(), {'encoding': 'utf8'}) | ||
} | ||
|
||
// run this after adding an example file to update playground.html, and testrunner.html | ||
gulp.task('update_examples', function() { | ||
updateExample('test/playground.html'); | ||
updateExample('test/testrunner.html'); | ||
}); | ||
|
||
gulp.task('default', ['update_examples']); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.