-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.js
22 lines (16 loc) · 1.02 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const assert = require('assert');
const descriptions = require('./');
async function testAll() {
await descriptions.load();
var a = descriptions('pineapple');
var b = descriptions('ananas comosus');
var c = [{code: 'E053', name: 'Pineapple', scie: 'Ananas comosus', desc: 'A. Ahnaros; B. Anarasa; G. Anenas; H. Ananas; Kan. Ananas; Kash. Punchitipul; Kh. Soh trun; Kon. Anas; Mal. Kayirha chakka; M. Kihom Ananas; O. Sapuri; P. Ananas; Tam. Annasi pazham; Tel. Anasa pandu; U. Ananas.'}];
assert.deepStrictEqual(a, c);
assert.deepStrictEqual(b, c);
var a = descriptions('tell me about cow milk.');
var b = descriptions('gai ka doodh details.');
var c = [{code: 'L002', name: 'Milk, Cow', scie: '', desc: 'A. Garoor gakhir; B. Doodh (garu); G. Gai nu dhudh; H. Gai ka doodh; Kan. Hasuvina halu; Kash. Doodh; Kh. Dud masi; M. San Sanghom; Mar. Doodh (gay); O. Gai dudha; P. Gaan da doodh; S. Gow kshiram; Tam. Pasumpaal; Tel. Aavu paalu.'}];
assert.deepStrictEqual(a, c);
assert.deepStrictEqual(b, c);
}
testAll();