From 597d41a0a135af7b36624c2159737857defaa1dd Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 29 Sep 2016 11:13:27 +0200 Subject: [PATCH] make sure timer based tests pass in firefox as well --- package.json | 8 ++++---- test/autorunAsync.js | 10 +++++----- test/typescript-tests.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 101f196d3..40a2c4b27 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "prepublish": "npm run small-build", "quick-build": "tsc", "small-build": "scripts/single-file-build.sh", - "test-browser-electron": "npm run small-build && ( browserify test/*.js | tape-run )", - "test-browser-chrome": "npm run small-build && ( browserify test/*.js | tape-run --browser chrome )", - "test-browser-safari": "npm run small-build && ( browserify test/*.js -t [ babelify --presets [ es2015 ] ] | tape-run --browser safari )", - "test-browser-firefox": "npm run small-build && ( browserify test/*.js | tape-run --browser firefox )", + "test-browser-electron": "npm run small-build && ( browserify test/*.js | tape-run | faucet )", + "test-browser-chrome": "npm run small-build && ( browserify test/*.js | tape-run --browser chrome | faucet )", + "test-browser-safari": "npm run small-build && ( browserify test/*.js -t [ babelify --presets [ es2015 ] ] | tape-run --browser safari | faucet )", + "test-browser-firefox": "npm run small-build && ( browserify test/*.js | tape-run --browser firefox | faucet )", "test-travis": "npm run small-build && npm run build-tests && tape test/*.js test/perf/index.js && tsc && istanbul cover tape test/*.js", "coverage": "npm run quick-build && npm run build-tests && istanbul cover tape test/*.js", "build-tests": "npm run build-typescript-tests && npm run build-babel-tests", diff --git a/test/autorunAsync.js b/test/autorunAsync.js index c06ea080e..80a0641c5 100644 --- a/test/autorunAsync.js +++ b/test/autorunAsync.js @@ -115,13 +115,13 @@ test('autorunAsync passes Reaction as an argument to view function', function(t) if (a.get() === 'pleaseDispose') r.dispose(); }, 10); - setTimeout(() => a.set(2), 25); - setTimeout(() => a.set('pleaseDispose'), 40); - setTimeout(() => a.set(3), 55); - setTimeout(() => a.set(4), 70); + setTimeout(() => a.set(2), 250); + setTimeout(() => a.set('pleaseDispose'), 400); + setTimeout(() => a.set(3), 550); + setTimeout(() => a.set(4), 700); setTimeout(function() { t.equal(autoRunsCalled, 3); t.end(); - }, 100); + }, 1000); }); diff --git a/test/typescript-tests.ts b/test/typescript-tests.ts index ae976971b..147ea4465 100644 --- a/test/typescript-tests.ts +++ b/test/typescript-tests.ts @@ -254,7 +254,7 @@ test('computed setter should succeed', function(t) { test('atom clock example', function(t) { let ticks = 0; - const time_factor = 50; // speed up / slow down tests + const time_factor = 500; // speed up / slow down tests class Clock { atom: Atom;