Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve tests for result.fetchAll() and result.fetchAllSync(). Closes #…

  • Loading branch information...
commit 8f3b1655c0945de9d665c137c978b7b206f78993 1 parent 13424b0
@Sannis authored
Showing with 16 additions and 4 deletions.
  1. +16 −2 tests/test-class-mysqlresult.js
  2. +0 −2  wscript
View
18 tests/test-class-mysqlresult.js
@@ -106,7 +106,7 @@ exports.DataSeekSync = function (test) {
};
exports.FetchAll = function (test) {
- test.expect(3);
+ test.expect(4);
var conn = mysql_libmysqlclient.createConnectionSync(cfg.host, cfg.user, cfg.password, cfg.database),
res;
@@ -115,6 +115,13 @@ exports.FetchAll = function (test) {
test.ok(res, "conn.querySync('SHOW TABLES;')");
res.fetchAll(function (tables) {
test.ok(tables, "res.fetchAll()");
+ res = false;
+ tables.forEach(function (table) {
+ if (table.Tables_in_test === cfg.test_table) {
+ res = true;
+ }
+ });
+ test.ok(res, "res.fetchAllSync() show test table");
conn.closeSync();
test.done();
@@ -122,7 +129,7 @@ exports.FetchAll = function (test) {
};
exports.FetchAllSync = function (test) {
- test.expect(3);
+ test.expect(4);
var conn = mysql_libmysqlclient.createConnectionSync(cfg.host, cfg.user, cfg.password, cfg.database),
res,
@@ -132,6 +139,13 @@ exports.FetchAllSync = function (test) {
test.ok(res, "conn.querySync('SHOW TABLES;')");
tables = res.fetchAllSync();
test.ok(tables, "res.fetchAllSync()");
+ res = false;
+ tables.forEach(function (table) {
+ if (table.Tables_in_test === cfg.test_table) {
+ res = true;
+ }
+ });
+ test.ok(res, "res.fetchAllSync() show test table");
conn.closeSync();
test.done();
View
2  wscript
@@ -56,8 +56,6 @@ def lint(lnt):
Utils.exec_command('nodelint ./mysql-libmysqlclient.js')
# Bindings tests
Utils.exec_command('nodelint ./tests/*.js')
- # Bindings benchmarks
- Utils.exec_command('nodelint ./benchmark/benchmark.js')
def shutdown():
# HACK to get bindings.node out of build directory.
Please sign in to comment.
Something went wrong with that request. Please try again.