diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..735daf0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +script: grunt test diff --git a/package.json b/package.json index e7152b3..d3fdde8 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "bugs": "https://github.com/js-platform/filer/issues", "license": "BSD", "scripts": { - "postinstall": "./node_modules/.bin/bower install" + "postinstall": "./node_modules/.bin/bower install", + "test": "grunt test" }, "repository": { "type": "git", diff --git a/tests/spec/fs.utimes.spec.js b/tests/spec/fs.utimes.spec.js index 39ea72e..70c6a5d 100644 --- a/tests/spec/fs.utimes.spec.js +++ b/tests/spec/fs.utimes.spec.js @@ -172,8 +172,8 @@ define(["Filer", "util"], function(Filer, util) { expect(error).not.to.exist; // Note: testing estimation as time may differ by a couple of milliseconds // This number should be increased if tests are on slow systems - expect(now - stat.atime).to.be.below(25); - expect(now - stat.mtime).to.be.below(25); + expect(now - stat.atime).to.be.below(75); + expect(now - stat.mtime).to.be.below(75); done(); }); }); diff --git a/tests/spec/providers/providers.websql.spec.js b/tests/spec/providers/providers.websql.spec.js index 908bffe..efc3e62 100644 --- a/tests/spec/providers/providers.websql.spec.js +++ b/tests/spec/providers/providers.websql.spec.js @@ -5,6 +5,11 @@ define(["Filer", "util"], function(Filer, util) { return; } + if(navigator.userAgent.indexOf('PhantomJS') > -1) { + console.log("Skipping Filer.FileSystem.providers.WebSQL tests, since PhantomJS doesn't support it."); + return; + } + describe("Filer.FileSystem.providers.WebSQL", function() { it("is supported -- if it isn't, none of these tests can run.", function() { expect(Filer.FileSystem.providers.WebSQL.isSupported()).to.be.true;