Skip to content

Commit ba79800

Browse files
dresendedougwilson
authored andcommitted
tests: add mysql.Types tests
1 parent 489e840 commit ba79800

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/unit/test-Mysql.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,20 @@ test('Mysql.format', {
1919
);
2020
}
2121
});
22+
23+
test('Mysql.Types', {
24+
'exported object of types': function() {
25+
assert.equal(typeof Mysql.Types, 'object');
26+
assert.ok(Mysql.Types);
27+
assert.equal(Mysql.Types, common.Types);
28+
},
29+
30+
'string names to integer values': function() {
31+
var types = Object.keys(Mysql.Types);
32+
assert.ok(types.length > 0);
33+
types.forEach(function (type) {
34+
assert.ok(/^[A-Z_]+/.test(type));
35+
assert.equal(typeof Mysql.Types[type], 'number');
36+
});
37+
}
38+
});

0 commit comments

Comments
 (0)