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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
lucas.parsy
jio
Commits
d9eb65a6
Commit
d9eb65a6
authored
Aug 26, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JIO job wait tests added
parent
535834c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
test/jio/tests.js
test/jio/tests.js
+46
-0
No files found.
test/jio/tests.js
View file @
d9eb65a6
...
...
@@ -907,4 +907,50 @@
});
test
(
'
Job Wait
'
,
function
()
{
expect
(
5
);
var
clock
,
jio
,
o
=
{};
clock
=
sinon
.
useFakeTimers
();
jio
=
new
JIO
({
"
type
"
:
"
fake
"
,
"
id
"
:
"
Job Wait
"
},
{
"
workspace
"
:
{}
});
jio
.
put
({
"
_id
"
:
"
a
"
}).
always
(
function
(
answer
)
{
deepEqual
(
answer
,
{
"
id
"
:
"
a
"
,
"
ok
"
:
true
,
"
status
"
:
200
,
"
statusText
"
:
"
Ok
"
},
"
First put respond
"
);
});
clock
.
tick
(
1
);
o
.
first_put_command
=
fakestorage
[
"
Job Wait/put
"
];
ok
(
o
.
first_put_command
,
"
First command called
"
);
o
.
first_put_command
.
free
();
jio
.
put
({
"
_id
"
:
"
a
"
,
"
a
"
:
"
b
"
}).
always
(
function
(
answer
)
{
deepEqual
(
answer
,
{
"
id
"
:
"
a
"
,
"
ok
"
:
true
,
"
status
"
:
200
,
"
statusText
"
:
"
Ok
"
},
"
Second put respond
"
);
});
clock
.
tick
(
1
);
ok
(
fakestorage
[
'
Job Wait/put
'
]
===
undefined
,
'
Second command not called yet
'
);
o
.
first_put_command
.
success
();
clock
.
tick
(
1
);
ok
(
fakestorage
[
'
Job Wait/put
'
],
'
Second command called
'
);
fakestorage
[
'
Job Wait/put
'
].
success
();
clock
.
tick
(
1
);
});
}));
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