Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
jio
Commits
0caaaae8
Commit
0caaaae8
authored
Aug 29, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace sinon.useFakeTimers with this.sandbox.useFakeTimers
parent
4516bf6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
test/jio/tests.js
test/jio/tests.js
+13
-13
No files found.
test/jio/tests.js
View file @
0caaaae8
/*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
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment