-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
32 lines (27 loc) · 764 Bytes
/
test.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
const assert = require('assert');
const groups = require('./');
function testAll() {
var a = groups('cereals');
var b = groups('Millet');
var c = [{
code: 'A', group: 'Cereals and Millets', entries: 24,
tags: 'vegetarian eggetarian fishetarian veg'
}];
assert.deepStrictEqual(a, c);
assert.deepStrictEqual(b, c);
var a = groups('what is vegetable?');
var b = groups('vegetable group code?');
var c = [
{
code: 'D', group: 'Other Vegetables', entries: 78,
tags: 'vegetarian eggetarian fishetarian veg'
},
{
code: 'C', group: 'Green Leafy Vegetables', entries: 34,
tags: 'vegetarian eggetarian fishetarian veg'
}
];
assert.deepStrictEqual(a, c);
assert.deepStrictEqual(b, c);
}
testAll();