Commit 290921af authored by Tristan Cavelier's avatar Tristan Cavelier

replace sinon.useFakeTimers with this.sandbox.useFakeTimers

parent 6b246fa8
/*jslint indent: 2, maxlen: 80, nomen: true */ /*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, window, exports, require, jIO, fake_storage, ok, module, test, /*global define, window, exports, require, jIO, fake_storage, ok, module, test,
expect, deepEqual, sinon, FileReader, Blob, setTimeout, localStorage */ expect, deepEqual, FileReader, Blob, setTimeout, localStorage */
(function (dependencies, module) { (function (dependencies, module) {
"use strict"; "use strict";
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
var workspace = {}, clock, jio, count = 0; var workspace = {}, clock, jio, count = 0;
expect(8); expect(8);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "fake", "type": "fake",
"id": "Asynchrony" "id": "Asynchrony"
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
test('Description Error', function () { test('Description Error', function () {
var clock, jio; var clock, jio;
expect(2); expect(2);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "blue" "type": "blue"
}, { }, {
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
test('No Response or Response Timeout', function () { test('No Response or Response Timeout', function () {
var clock, jio, state; var clock, jio, state;
expect(5); expect(5);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "fake", "type": "fake",
"id": "1 No Respons" "id": "1 No Respons"
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
test('Invalid Response', function () { test('Invalid Response', function () {
var clock, jio; var clock, jio;
expect(2); expect(2);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "fake", "type": "fake",
"id": "1 Invalid Re" "id": "1 Invalid Re"
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
test('Valid Responses & Callbacks', function () { test('Valid Responses & Callbacks', function () {
var clock, jio, o = {}; var clock, jio, o = {};
expect(9); expect(9);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "fake", "type": "fake",
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
*/ */
test('Metadata values', function () { test('Metadata values', function () {
expect(9); expect(9);
var o, clock = sinon.useFakeTimers(), jio = new JIO({ var o, clock = this.sandbox.useFakeTimers(), jio = new JIO({
"type": "fake", "type": "fake",
"id": "Metadata v" "id": "Metadata v"
}, { }, {
...@@ -573,7 +573,7 @@ ...@@ -573,7 +573,7 @@
test("Job Retry", function () { test("Job Retry", function () {
var clock, jio, state; var clock, jio, state;
expect(4); expect(4);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "fake", "type": "fake",
...@@ -619,7 +619,7 @@ ...@@ -619,7 +619,7 @@
var workspace = {}, clock, jio, o = {}; var workspace = {}, clock, jio, o = {};
expect(8); expect(8);
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jio = new JIO({ jio = new JIO({
"type": "fake", "type": "fake",
"id": "1 Job Manage" "id": "1 Job Manage"
...@@ -734,7 +734,7 @@ ...@@ -734,7 +734,7 @@
expect(4); expect(4);
var workspace, clock, jio; var workspace, clock, jio;
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
////////////////////////////// //////////////////////////////
// Running job recovery // Running job recovery
...@@ -832,7 +832,7 @@ ...@@ -832,7 +832,7 @@
test('Job Update', function () { test('Job Update', function () {
expect(5); expect(5);
var clock, jio, o = {}; var clock, jio, o = {};
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
o.workspace = {}; o.workspace = {};
jio = new JIO({ jio = new JIO({
...@@ -880,7 +880,7 @@ ...@@ -880,7 +880,7 @@
test('Job Wait', function () { test('Job Wait', function () {
expect(6); expect(6);
var clock, jio, o = {}; var clock, jio, o = {};
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
o.workspace = {}; o.workspace = {};
jio = new JIO({ jio = new JIO({
...@@ -931,7 +931,7 @@ ...@@ -931,7 +931,7 @@
test('Job Deny + Job condition addition', function () { test('Job Deny + Job condition addition', function () {
expect(2); expect(2);
var clock, jio, workspace = {}; var clock, jio, workspace = {};
clock = sinon.useFakeTimers(); clock = this.sandbox.useFakeTimers();
jIO.addJobRuleCondition('isGetMethod', function (job) { jIO.addJobRuleCondition('isGetMethod', function (job) {
return job.method === 'get'; return job.method === 'get';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment