glucose
Version:
Sugar coat option.
43 lines (33 loc) • 990 B
HTML
<html>
<head>
<title>glucose unit test</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.3.2.css">
<script type="application/javascript" src="https://code.jquery.com/qunit/qunit-2.3.2.js"></script>
<script type="application/javascript" src="./glucose.deploy.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script type="application/javascript">
QUnit.test( "glucose unit test", function( assert ) {
assert.equal( JSON.stringify( glucose( { "hello": "world" } ) ),
JSON.stringify( {
"factor": [ ],
"identity": { },
"setting": { },
"query": { },
"pagination": { },
"data": { },
"list": [ ],
"element": { },
"array": { },
"scope": [ ],
"permission": [ ],
"hello": "world"
} ) );
assert.equal( typeof glucose( { "hello": "world" } ) == "object", true, "should return true" );
} );
</script>
</body>
</html>