From beb277e4aec3500e391f2e4b09fc0c41a3456a80 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 23 May 2016 10:37:26 -0400 Subject: [PATCH] Fix Windows tests in Appveyor https://github.com/jviotti/electron-json-storage/issues/4 Signed-off-by: Juan Cruz Viotti --- README.md | 2 +- appveyor.yml | 2 ++ doc/README.hbs | 2 +- package.json | 2 +- tests/storage.spec.js | 2 ++ tests/utils.spec.js | 2 ++ 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 132a7a7..3452322 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ electron-json-storage [![npm version](https://badge.fury.io/js/electron-json-storage.svg)](http://badge.fury.io/js/electron-json-storage) [![dependencies](https://david-dm.org/jviotti/electron-json-storage.svg)](https://david-dm.org/jviotti/electron-json-storage.svg) [![Build Status](https://travis-ci.org/jviotti/electron-json-storage.svg?branch=master)](https://travis-ci.org/jviotti/electron-json-storage) -[![Build status](https://ci.appveyor.com/api/projects/status/j9k3k7mgraardwvd/branch/master?svg=true)](https://ci.appveyor.com/project/jviotti/electron-json-storage/branch/master) +[![Build status](https://ci.appveyor.com/api/projects/status/ulwk1nnh7l8209xg/branch/master?svg=true)](https://ci.appveyor.com/project/jviotti/electron-json-storage/branch/master) [Electron](http://electron.atom.io) lacks an easy way to persist and read user settings for your application. `electron-json-storage` implements an API somehow similar to [localStorage](https://developer.mozilla.org/en/docs/Web/API/Window/localStorage) to write and read JSON objects to/from the operating system application data directory, as defined by `app.getPath('userData')`. diff --git a/appveyor.yml b/appveyor.yml index b8e75c9..02220cf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,8 @@ cache: # what combinations to test environment: + global: + ELECTRON_NO_ATTACH_CONSOLE: true matrix: - nodejs_version: 4 diff --git a/doc/README.hbs b/doc/README.hbs index d4dc7af..dc5346d 100644 --- a/doc/README.hbs +++ b/doc/README.hbs @@ -6,7 +6,7 @@ electron-json-storage [![npm version](https://badge.fury.io/js/electron-json-storage.svg)](http://badge.fury.io/js/electron-json-storage) [![dependencies](https://david-dm.org/jviotti/electron-json-storage.svg)](https://david-dm.org/jviotti/electron-json-storage.svg) [![Build Status](https://travis-ci.org/jviotti/electron-json-storage.svg?branch=master)](https://travis-ci.org/jviotti/electron-json-storage) -[![Build status](https://ci.appveyor.com/api/projects/status/j9k3k7mgraardwvd/branch/master?svg=true)](https://ci.appveyor.com/project/jviotti/electron-json-storage/branch/master) +[![Build status](https://ci.appveyor.com/api/projects/status/ulwk1nnh7l8209xg/branch/master?svg=true)](https://ci.appveyor.com/project/jviotti/electron-json-storage/branch/master) [Electron](http://electron.atom.io) lacks an easy way to persist and read user settings for your application. `electron-json-storage` implements an API somehow similar to [localStorage](https://developer.mozilla.org/en/docs/Web/API/Window/localStorage) to write and read JSON objects to/from the operating system application data directory, as defined by `app.getPath('userData')`. diff --git a/package.json b/package.json index e9783f0..683e8be 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test": "tests" }, "scripts": { - "test": "electron-mocha --recursive tests -R progress && electron-mocha --renderer --recursive tests -R progress", + "test": "electron-mocha --recursive tests -R spec && electron-mocha --renderer --recursive tests -R spec", "lint": "jshint --config .jshintrc --reporter unix lib tests", "readme": "jsdoc2md --template doc/README.hbs lib/storage.js > README.md" }, diff --git a/tests/storage.spec.js b/tests/storage.spec.js index 099ac99..41ded44 100644 --- a/tests/storage.spec.js +++ b/tests/storage.spec.js @@ -33,6 +33,8 @@ const utils = require('../lib/utils'); describe('Electron JSON Storage', function() { + this.timeout(10000); + // Ensure each test case is always ran in a clean state beforeEach(storage.clear); diff --git a/tests/utils.spec.js b/tests/utils.spec.js index 5e8d7a8..e72dd50 100644 --- a/tests/utils.spec.js +++ b/tests/utils.spec.js @@ -30,6 +30,8 @@ const utils = require('../lib/utils'); describe('Utils', function() { + this.timeout(10000); + describe('.getUserDataPath()', function() { it('should return an absolute path', function() {