diff options
author | Wilson Page <wilsonpage@me.com> | 2013-10-12 13:41:41 -0700 |
---|---|---|
committer | Wilson Page <wilsonpage@me.com> | 2013-10-12 13:41:41 -0700 |
commit | cf8f3ad94d43a25c57b1c4e5628c86c12e939383 (patch) | |
tree | 255b5b586fa4c7d9da54a043cb216b19d1d58226 /test | |
parent | 65d2a275a30951910465b37a0ac26790d59d699b (diff) | |
parent | 0343f75622d85330925d35b6193cd728699b7477 (diff) | |
download | fastdom-cf8f3ad94d43a25c57b1c4e5628c86c12e939383.zip fastdom-cf8f3ad94d43a25c57b1c4e5628c86c12e939383.tar.gz fastdom-cf8f3ad94d43a25c57b1c4e5628c86c12e939383.tar.bz2 |
Merge pull request #31 from Krinkle/cleanup
Minor clean up and setting up JSHint
Diffstat (limited to 'test')
-rw-r--r-- | test/test.clear.js | 16 | ||||
-rw-r--r-- | test/test.defer.js | 6 | ||||
-rw-r--r-- | test/test.set.js | 24 |
3 files changed, 23 insertions, 23 deletions
diff --git a/test/test.clear.js b/test/test.clear.js index ee60f2e..5194830 100644 --- a/test/test.clear.js +++ b/test/test.clear.js @@ -1,7 +1,7 @@ -suite('Clear', function(){ +suite('clear', function(){ - test("Should not run 'read' job if cleared (sync)", function(done) { + test('Should not run "read" job if cleared (sync)', function(done) { var fastdom = new FastDom(); var read = sinon.spy(); @@ -14,7 +14,7 @@ suite('Clear', function(){ }); }); - test("Should fail silently if job not found in queue", function(done) { + test('Should fail silently if job not found in queue', function(done) { var fastdom = new FastDom(); var read = sinon.spy(); var read2 = sinon.spy(); @@ -28,7 +28,7 @@ suite('Clear', function(){ }); }); - test("Should not run 'write' job if cleared (async)", function(done) { + test('Should not run "write" job if cleared (async)', function(done) { var fastdom = new FastDom(); var read = sinon.spy(); var write = sinon.spy(); @@ -44,7 +44,7 @@ suite('Clear', function(){ }); }); - test("Should not run 'write' job if cleared", function(done) { + test('Should not run "write" job if cleared', function(done) { var fastdom = new FastDom(); var write = sinon.spy(); var id = fastdom.write(write); @@ -57,7 +57,7 @@ suite('Clear', function(){ }); }); - test("Should not run 'defer' job if cleared", function(done) { + test('Should not run "defer" job if cleared', function(done) { var fastdom = new FastDom(); var write = sinon.spy(); var id = fastdom.defer(3, write); @@ -76,7 +76,7 @@ suite('Clear', function(){ }); }); - test("Should remove reference to the job if cleared", function(done) { + test('Should remove reference to the job if cleared', function(done) { var fastdom = new FastDom(); var write = sinon.spy(); var id = fastdom.defer(2, write); @@ -94,4 +94,4 @@ suite('Clear', function(){ }); }); -});
\ No newline at end of file +}); diff --git a/test/test.defer.js b/test/test.defer.js index c1ae179..3e56a94 100644 --- a/test/test.defer.js +++ b/test/test.defer.js @@ -1,7 +1,7 @@ suite('defer', function(){ - test("Should run the job after the specified number of frames", function(done) { + test('Should run the job after the specified number of frames', function(done) { var fastdom = new FastDom(); var job = sinon.spy(); @@ -22,7 +22,7 @@ suite('defer', function(){ }); }); - test("Should call a deferred callback with the given context", function(done) { + test('Should call a deferred callback with the given context', function(done) { var fastdom = new FastDom(); var cb = sinon.spy(); var ctx = { foo: 'bar' }; @@ -33,7 +33,7 @@ suite('defer', function(){ }, ctx); }); - test("Should remove the reference to the job once run", function(done) { + test('Should remove the reference to the job once run', function(done) { var fastdom = new FastDom(); var callback = sinon.spy(); var id = fastdom.defer(2, callback); diff --git a/test/test.set.js b/test/test.set.js index a1dd83c..440848d 100644 --- a/test/test.set.js +++ b/test/test.set.js @@ -1,7 +1,7 @@ -suite('Set', function() { +suite('set', function() { - test("Should run reads before writes", function(done) { + test('Should run reads before writes', function(done) { var fastdom = new FastDom(); var read = sinon.spy(function() { @@ -17,7 +17,7 @@ suite('Set', function() { fastdom.write(write); }); - test("Should call all reads together, followed by all writes", function(done) { + test('Should call all reads together, followed by all writes', function(done) { var fastdom = new FastDom(); var read1 = sinon.spy(); var read2 = sinon.spy(); @@ -41,7 +41,7 @@ suite('Set', function() { }); }); - test("Should call a read in the same frame if scheduled inside a read callback", function(done) { + test('Should call a read in the same frame if scheduled inside a read callback', function(done) { var fastdom = new FastDom(); var cb = sinon.spy(); @@ -62,7 +62,7 @@ suite('Set', function() { }); }); - test("Should call a write in the same frame if scheduled inside a read callback", function(done) { + test('Should call a write in the same frame if scheduled inside a read callback', function(done) { var fastdom = new FastDom(); var cb = sinon.spy(); @@ -83,7 +83,7 @@ suite('Set', function() { }); }); - test("Should call a read in the *next* frame if scheduled inside a write callback", function(done) { + test('Should call a read in the *next* frame if scheduled inside a write callback', function(done) { var fastdom = new FastDom(); var cb = sinon.spy(); @@ -103,7 +103,7 @@ suite('Set', function() { }); }); - test("Should call a 'read' callback with the given context", function(done) { + test('Should call a "read" callback with the given context', function(done) { var fastdom = new FastDom(); var cb = sinon.spy(); var ctx = { foo: 'bar' }; @@ -114,7 +114,7 @@ suite('Set', function() { }, ctx); }); - test("Should call a 'write' callback with the given context", function(done) { + test('Should call a "write" callback with the given context', function(done) { var fastdom = new FastDom(); var cb = sinon.spy(); var ctx = { foo: 'bar' }; @@ -125,7 +125,7 @@ suite('Set', function() { }, ctx); }); - test("Should have empty job hash when batch complete", function(done) { + test('Should have empty job hash when batch complete', function(done) { var fastdom = new FastDom(); fastdom.read(function(){}); @@ -142,7 +142,7 @@ suite('Set', function() { }); }); - test("Should maintain correct context if single method is registered twice", function(done) { + test('Should maintain correct context if single method is registered twice', function(done) { var fastdom = new FastDom(); var ctx1 = { foo: 'bar' }; var ctx2 = { bar: 'baz' }; @@ -162,7 +162,7 @@ suite('Set', function() { }); }); - test("Should call a registered onError handler when an error is thrown inside a job", function(done) { + test('Should call a registered onError handler when an error is thrown inside a job', function(done) { var fastdom = new FastDom(); var err1 = { some: 'error1' }; var err2 = { some: 'error2' }; @@ -184,4 +184,4 @@ suite('Set', function() { done(); }); }); -});
\ No newline at end of file +}); |