Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
84145701
Commit
84145701
authored
Aug 06, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localstorage.tests.js + jio/tests.js jslint pass
parent
d1dbaade
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
test/jio.storage/localstorage.tests.js
test/jio.storage/localstorage.tests.js
+15
-13
test/jio/tests.js
test/jio/tests.js
+1
-1
No files found.
test/jio.storage/localstorage.tests.js
View file @
84145701
...
@@ -349,7 +349,9 @@
...
@@ -349,7 +349,9 @@
}
}
});
});
util
.
jsonlocalstorage
.
setItem
(
util
.
jsonlocalstorage
.
setItem
(
"
jio/localstorage/uremove/aremove/remove1/remove2
"
,
"
fghi
"
);
"
jio/localstorage/uremove/aremove/remove1/remove2
"
,
"
fghi
"
);
// remove attachment
// remove attachment
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
},
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
},
...
@@ -432,7 +434,7 @@
...
@@ -432,7 +434,7 @@
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
o
.
fakeDoc
=
{};
o
.
fakeDoc
=
{};
o
.
fakeDoc
.
_id
=
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
);
o
.
fakeDoc
.
_id
=
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
);
o
.
fakeDoc
.
title
=
o
.
titles
[
i
];
o
.
fakeDoc
.
title
=
o
.
titles
[
i
];
o
.
fakeDoc
.
year
=
o
.
years
[
i
];
o
.
fakeDoc
.
year
=
o
.
years
[
i
];
o
.
fakeDoc
.
author
=
o
.
director
[
i
];
o
.
fakeDoc
.
author
=
o
.
director
[
i
];
...
@@ -447,7 +449,7 @@
...
@@ -447,7 +449,7 @@
util
.
jsonlocalstorage
.
setItem
(
o
.
localpath
+
"
/doc_05/att
"
,
"
abc
"
);
util
.
jsonlocalstorage
.
setItem
(
o
.
localpath
+
"
/doc_05/att
"
,
"
abc
"
);
}
}
util
.
jsonlocalstorage
.
setItem
(
util
.
jsonlocalstorage
.
setItem
(
o
.
localpath
+
"
/doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
o
.
localpath
+
"
/doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
o
.
fakeDoc
o
.
fakeDoc
);
);
}
}
...
@@ -458,8 +460,8 @@
...
@@ -458,8 +460,8 @@
o
.
allDocsResponse
.
total_rows
=
15
;
o
.
allDocsResponse
.
total_rows
=
15
;
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
o
.
allDocsResponse
.
rows
.
push
({
o
.
allDocsResponse
.
rows
.
push
({
"
id
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
id
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
key
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
key
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
value
"
:
{}
"
value
"
:
{}
});
});
}
}
...
@@ -481,11 +483,11 @@
...
@@ -481,11 +483,11 @@
o
.
allDocsResponse
.
total_rows
=
m
;
o
.
allDocsResponse
.
total_rows
=
m
;
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
o
.
allDocsResponse
.
rows
.
push
({
o
.
allDocsResponse
.
rows
.
push
({
"
id
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
id
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
key
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
key
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
),
"
value
"
:
{},
"
value
"
:
{},
"
doc
"
:
util
.
jsonlocalstorage
.
getItem
(
"
doc
"
:
util
.
jsonlocalstorage
.
getItem
(
o
.
localpath
+
"
/doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
o
.
localpath
+
"
/doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
)
)
});
});
}
}
...
@@ -516,8 +518,8 @@
...
@@ -516,8 +518,8 @@
}
}
});
});
o
.
thisShouldBeTheAnswer4
.
rows
.
sort
(
function
(
a
,
b
)
{
o
.
thisShouldBeTheAnswer4
.
rows
.
sort
(
function
(
a
,
b
)
{
return
a
.
value
.
year
>
b
.
value
.
year
?
-
1
:
return
(
a
.
value
.
year
>
b
.
value
.
year
?
-
1
:
a
.
value
.
year
<
b
.
value
.
year
?
1
:
0
;
a
.
value
.
year
<
b
.
value
.
year
?
1
:
0
)
;
});
});
o
.
thisShouldBeTheAnswer4
.
total_rows
=
5
;
o
.
thisShouldBeTheAnswer4
.
total_rows
=
5
;
o
.
thisShouldBeTheAnswer4
.
rows
.
length
=
5
;
o
.
thisShouldBeTheAnswer4
.
rows
.
length
=
5
;
...
@@ -526,7 +528,7 @@
...
@@ -526,7 +528,7 @@
"
allDocs (complex queries year >= 1980, all query options)
"
);
"
allDocs (complex queries year >= 1980, all query options)
"
);
o
.
jio
.
allDocs
({
o
.
jio
.
allDocs
({
"
query
"
:
'
(year: >= "1980")
'
,
"
query
"
:
'
(year: >= "1980")
'
,
"
limit
"
:
[
0
,
5
],
"
limit
"
:
[
0
,
5
],
"
sort_on
"
:
[[
"
year
"
,
"
descending
"
]],
"
sort_on
"
:
[[
"
year
"
,
"
descending
"
]],
"
select_list
"
:
[
"
title
"
,
"
year
"
]
"
select_list
"
:
[
"
title
"
,
"
year
"
]
},
o
.
f
);
},
o
.
f
);
...
@@ -541,8 +543,8 @@
...
@@ -541,8 +543,8 @@
o
.
thisShouldBeTheAnswer5
.
total_rows
+=
1
;
o
.
thisShouldBeTheAnswer5
.
total_rows
+=
1
;
});
});
o
.
thisShouldBeTheAnswer5
.
rows
.
sort
(
function
(
a
,
b
)
{
o
.
thisShouldBeTheAnswer5
.
rows
.
sort
(
function
(
a
,
b
)
{
return
a
.
value
.
title
>
b
.
value
.
title
?
-
1
:
return
(
a
.
value
.
title
>
b
.
value
.
title
?
-
1
:
a
.
value
.
title
<
b
.
value
.
title
?
1
:
0
;
a
.
value
.
title
<
b
.
value
.
title
?
1
:
0
)
;
});
});
o
.
spy
(
o
,
"
value
"
,
o
.
thisShouldBeTheAnswer5
,
o
.
spy
(
o
,
"
value
"
,
o
.
thisShouldBeTheAnswer5
,
...
...
test/jio/tests.js
View file @
84145701
...
@@ -690,7 +690,7 @@
...
@@ -690,7 +690,7 @@
o
.
jio_id
=
o
.
jio
.
getId
();
o
.
jio_id
=
o
.
jio
.
getId
();
o
.
jio
.
put
({
"
_id
"
:
"
file
"
,
"
title
"
:
"
myFile
"
},
{
"
max_retry
"
:
3
},
o
.
f
);
o
.
jio
.
put
({
"
_id
"
:
"
file
"
,
"
title
"
:
"
myFile
"
},
{
"
max_retry
"
:
3
},
o
.
f
);
waitUntilLastJobIs
(
"
initial
"
);
// "on going" or "wait" should work
waitUntilLastJobIs
(
"
initial
"
);
// "on going" or "wait" should work
// xxx also test with waitUntilLastJobIs("on going") ?
// xxx also test with waitUntilLastJobIs("on going") ?
o
.
jio
.
close
();
o
.
jio
.
close
();
...
...
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