From 4880c162f8081ed4a579e24e7e534da02098c0fa Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 5 Jun 2014 15:36:53 +0200 Subject: [PATCH] Fix paths to unit --- Gruntfile.js | 16 ++---------- README.md | 4 +-- package.json | 1 - test/unit/crypto-test.js | 5 ++-- test/unit/main.js | 54 ++++++++++++++++++++-------------------- 5 files changed, 34 insertions(+), 46 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 689e53b..d3bfbaa 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -44,29 +44,17 @@ module.exports = function(grunt) { }, jshint: { - all: ['Gruntfile.js', 'src/*.js', 'src/js/**/*.js', 'test/new-unit/*.js', 'test/unit/*.js', 'test/integration/*.js'], + all: ['Gruntfile.js', 'src/*.js', 'src/js/**/*.js', 'test/unit/*.js', 'test/integration/*.js'], options: { jshintrc: '.jshintrc' } }, - qunit: { - all: { - options: { - timeout: 20000, - urls: ['http://localhost:<%= connect.test.options.port %>/test/unit/index.html' - /*, - 'http://localhost:<%= connect.test.options.port %>/test/integration/index.html'*/ - ] - } - } - }, - mocha: { all: { options: { urls: [ - 'http://localhost:<%= connect.test.options.port %>/test/new-unit/index.html', + 'http://localhost:<%= connect.test.options.port %>/test/unit/index.html', 'http://localhost:<%= connect.test.options.port %>/test/integration/index.html' ], run: false, diff --git a/README.md b/README.md index 32b3bfa..2b42fcf 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ We take the privacy of your data very seriously. Here are some of the technical You can download a prebuilt bundle under [releases](https://github.com/whiteout-io/mail-html5/releases) or build your own from source (requires [node.js](http://nodejs.org/download/), [grunt](http://gruntjs.com/getting-started#installing-the-cli) and [sass](http://sass-lang.com/install)): npm install && npm test - + This will download all dependencies, run the tests and build the Chrome Packaged App bundle **DEV.zip** which can be installed under [chrome://extensions](chrome://extensions) in developer mode. ### Development @@ -40,7 +40,7 @@ For development you can start a connect dev server: grunt dev -Then visit [http://localhost:8580/dist/chrome.html#/desktop](http://localhost:8580/dist/chrome.html#/desktop) for front-end code or [http://localhost:8580/test/new-unit/](http://localhost:8580/test/new-unit/) to test JavaScript changes. You can also start a watch task so you don't have rebuild everytime you make a change: +Then visit [http://localhost:8580/dist/chrome.html#/desktop](http://localhost:8580/dist/chrome.html#/desktop) for front-end code or [http://localhost:8580/test/unit/](http://localhost:8580/test/unit/) to test JavaScript changes. You can also start a watch task so you don't have rebuild everytime you make a change: grunt watch diff --git a/package.json b/package.json index b7b6663..676c51e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "sinon": "~1.7.3", "grunt-contrib-connect": "~0.5.0", "grunt-contrib-jshint": "~0.6.4", - "grunt-contrib-qunit": "~0.2.2", "grunt-mocha": "~0.4.1", "grunt-contrib-clean": "~0.5.0", "grunt-csso": "~0.6.1", diff --git a/test/unit/crypto-test.js b/test/unit/crypto-test.js index 7cd75af..5c2e730 100644 --- a/test/unit/crypto-test.js +++ b/test/unit/crypto-test.js @@ -6,9 +6,10 @@ define(function(require) { expect = chai.expect; describe('Crypto unit tests', function() { - var crypto; + this.timeout(20000); - var password = 'password', + var crypto, + password = 'password', keySize = 128, ivSize = 128; diff --git a/test/unit/main.js b/test/unit/main.js index abdb328..f187b3e 100644 --- a/test/unit/main.js +++ b/test/unit/main.js @@ -28,33 +28,33 @@ function startTests() { require( [ - 'test/new-unit/oauth-test', - 'test/new-unit/auth-test', - 'test/new-unit/email-dao-test', - 'test/new-unit/app-controller-test', - 'test/new-unit/pgp-test', - 'test/new-unit/crypto-test', - 'test/new-unit/rest-dao-test', - 'test/new-unit/publickey-dao-test', - 'test/new-unit/lawnchair-dao-test', - 'test/new-unit/keychain-dao-test', - 'test/new-unit/devicestorage-dao-test', - 'test/new-unit/dialog-ctrl-test', - 'test/new-unit/add-account-ctrl-test', - 'test/new-unit/account-ctrl-test', - 'test/new-unit/set-passphrase-ctrl-test', - 'test/new-unit/contacts-ctrl-test', - 'test/new-unit/login-existing-ctrl-test', - 'test/new-unit/login-initial-ctrl-test', - 'test/new-unit/login-new-device-ctrl-test', - 'test/new-unit/login-ctrl-test', - 'test/new-unit/read-ctrl-test', - 'test/new-unit/navigation-ctrl-test', - 'test/new-unit/mail-list-ctrl-test', - 'test/new-unit/write-ctrl-test', - 'test/new-unit/outbox-bo-test', - 'test/new-unit/invitation-dao-test', - 'test/new-unit/update-handler-test' + 'test/unit/oauth-test', + 'test/unit/auth-test', + 'test/unit/email-dao-test', + 'test/unit/app-controller-test', + 'test/unit/pgp-test', + 'test/unit/crypto-test', + 'test/unit/rest-dao-test', + 'test/unit/publickey-dao-test', + 'test/unit/lawnchair-dao-test', + 'test/unit/keychain-dao-test', + 'test/unit/devicestorage-dao-test', + 'test/unit/dialog-ctrl-test', + 'test/unit/add-account-ctrl-test', + 'test/unit/account-ctrl-test', + 'test/unit/set-passphrase-ctrl-test', + 'test/unit/contacts-ctrl-test', + 'test/unit/login-existing-ctrl-test', + 'test/unit/login-initial-ctrl-test', + 'test/unit/login-new-device-ctrl-test', + 'test/unit/login-ctrl-test', + 'test/unit/read-ctrl-test', + 'test/unit/navigation-ctrl-test', + 'test/unit/mail-list-ctrl-test', + 'test/unit/write-ctrl-test', + 'test/unit/outbox-bo-test', + 'test/unit/invitation-dao-test', + 'test/unit/update-handler-test' ], function() { //Tests loaded, run tests mocha.run();