Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure timer based tests pass in firefox as well #590

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions test/autorunAsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
2 changes: 1 addition & 1 deletion test/typescript-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down