-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
32 lines (25 loc) · 834 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
/**
* Created by zivlevi1 on 11.9.2017.
*/
const Transform = require('.././transform');
const Load = require('.././load');
var assert = require('assert');
describe('checkType', function() {
it('should return VARCHAR(255)', function() {
assert.equal("VARCHAR(255)", Load.checkType("object"));
});
});
describe('createFields', function() {
it('should return list of fields', function() {
var res = ["_id","name","address"];
Transform.setColums(res);
assert.equal("_id, name, address, ", Transform.createFields());
});
});
describe('createFields', function() {
it('should return list of types', function() {
var res = ["string","number","number"];
Transform.setTypes(res);
assert.equal("VARCHAR(255), INT, INT, ", Transform.createTypes());
});
});