summaryrefslogtreecommitdiffstats
path: root/test/test.set.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.set.js')
-rw-r--r--test/test.set.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test.set.js b/test/test.set.js
index a41259a..2df30f7 100644
--- a/test/test.set.js
+++ b/test/test.set.js
@@ -67,9 +67,6 @@ suite('set', function() {
test('Should call a write in the same frame if scheduled inside a read callback', function(done) {
var fastdom = new FastDom();
-
- fastdom.catchErrors = false;
-
var cb = sinon.spy();
fastdom.read(function() {
@@ -174,12 +171,12 @@ suite('set', function() {
});
});
- test('Should no error if the `quiet` flag is set', function(done) {
+ test('Should run onError handler if one has been registered', function(done) {
var fastdom = new FastDom();
var err1 = { some: 'error1' };
var err2 = { some: 'error2' };
- fastdom.quiet = true;
+ fastdom.onError = sinon.spy();
fastdom.read(function() {
throw err1;
@@ -190,6 +187,9 @@ suite('set', function() {
});
raf(function() {
+ assert(fastdom.onError.calledTwice);
+ assert(fastdom.onError.getCall(0).calledWith(err1));
+ assert(fastdom.onError.getCall(1).calledWith(err2));
done();
});
});