Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rjs_json_form
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
Jérome Perrin
rjs_json_form
Commits
3b94b6aa
Commit
3b94b6aa
authored
Aug 07, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: improve test result information
parent
112a9f3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
test/jsonform_test.js
test/jsonform_test.js
+12
-2
No files found.
test/jsonform_test.js
View file @
3b94b6aa
...
...
@@ -140,10 +140,20 @@
return
gadget
.
getContent
();
})
.
push
(
function
(
json_document
)
{
assert
.
deepEqual
(
schema
,
schema_orig
,
"
schema not change (side effect absent)
"
);
assert
.
deepEqual
(
JSON
.
parse
(
json_document
[
key
]),
value
,
"
returned value equal
"
);
var
returned_value
;
assert
.
ok
(
json_document
.
hasOwnProperty
(
key
),
"
getContent does not content property
"
);
assert
.
deepEqual
(
schema
,
schema_orig
,
"
schema changed (side effect on schema)
"
);
try
{
returned_value
=
JSON
.
parse
(
json_document
[
key
]);
}
catch
(
error
)
{
assert
.
notOk
(
"
value not parsable:'
"
+
returned_value
+
"
'
\n
"
+
error
);
}
assert
.
deepEqual
(
returned_value
,
value
,
"
document changed without user interact (side effect on data)
"
);
})
.
push
(
undefined
,
function
(
error
)
{
console
.
log
(
assert
.
test
.
module
.
name
+
'
:
'
+
assert
.
test
.
testName
);
console
.
error
(
error
);
assert
.
notOk
(
error
,
"
issue in gadget
"
);
})
.
push
(
function
()
{
...
...
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