-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaddMultipleRowsGridTest.js
41 lines (39 loc) · 1.17 KB
/
addMultipleRowsGridTest.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// COMMOND TO RUN ON BROWSER
// OPEN CHEOME
// THEN TYPE
// http://localhost/aspire/js/lib/node_modules/intern/client.html?config=dijitx/tests/AddMultipleRowsGrid/unitTest/addMultipleRowsGrid
define([
'intern!object',
'intern/chai!assert',
'dijitx/addMultipleRowsGrid'
], function (registerSuite, assert, addMultipleRowsGrid) {
registerSuite({
ObjectToArrayFunction: function () {
var input={
1:{
name:"Richa",
age:"21"
},
2:{
name:"Raghav",
age:"25"
}
};
var expOpt = [
{
name:"Richa",
age:"21"
},
{
name:"Raghav",
age:"25"
}
];
var grid = new addMultipleRowsGrid();
var output= grid.objectToArray(input);
console.log(output);
console.log(expOpt)
assert.strictEqual(JSON.stringify(output), JSON.stringify(expOpt), "Output as expected");
}
});
});