Skip to content

Commit 59f9d31

Browse files
author
Christopher J. Brody
committed
minor test fixes
1 parent 8b981a9 commit 59f9d31

6 files changed

+13
-12
lines changed

spec/www/spec/db-sql-operations-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ var mytests = function() {
15091509
// and finish this test:
15101510
db.close(done, done);
15111511
});
1512-
});
1512+
}, MYTIMEOUT);
15131513

15141514
});
15151515

@@ -1601,7 +1601,7 @@ var mytests = function() {
16011601
if (checkCount === expectedCheckCount) db.close(done, done);
16021602
});
16031603
});
1604-
});
1604+
}, MYTIMEOUT);
16051605

16061606
});
16071607

spec/www/spec/db-tx-error-mapping-test.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ var mytests = function() {
3535
// TBD skip plugin test on browser platform (not yet supported):
3636
if (isBrowser && (i === 0)) continue;
3737

38-
// GENERAL: SKIP ALL on WP8 for now
3938
describe(scenarioList[i] + ': db tx error mapping test(s)' +
4039
(isWindows ?
4140
' [Windows version with INCORRECT error code (0) & INCONSISTENT error message (missing actual error info)]' :
@@ -244,8 +243,10 @@ var mytests = function() {
244243
expect(error.message).toMatch(/callback raised an exception.*or.*error callback did not return false/);
245244
else if (isWindows)
246245
expect(error.message).toMatch(/error callback did not return false.*Error preparing an SQLite statement/);
247-
//* else //* XXX TBD
248-
//* expect(error.message).toMatch(/error callback did not return false.*syntax error/);
246+
else if (isAndroid && isImpl2)
247+
expect(error.message).toMatch(/error callback did not return false.*syntax error/);
248+
else
249+
expect(error.message).toMatch(/error callback did not return false.*incomplete input/);
249250

250251
isWebSql ? done() : db.close(done, done);
251252
}, function() {

spec/www/spec/db-tx-sql-select-value-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ var mytests = function() {
10691069
// - Android version returns result with missing row
10701070
it(suiteName + "SELECT ABS(?) with '9e999' (Infinity) parameter argument" +
10711071
((!isWebSql && isAndroid) ? ' [Android PLUGIN BROKEN: result with missing row]' : ''), function(done) {
1072-
if (!isWebSql && !isAndroid && !isWindows) pending('SKIP for iOS/macOS plugin due to CRASH');
1072+
if (!isWebSql && (isAppleMobileOS || isMac)) pending('KNOWN CRASH on iOS/macOS'); // XXX (litehelpers/Cordova-sqlite-storage#405)
10731073

10741074
var db = openDatabase('SELECT-ABS-Infinite-parameter-results-test.db', '1.0', 'Test', DEFAULT_SIZE);
10751075

spec/www/spec/db-tx-value-bindings-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ var mytests = function() {
11111111
});
11121112
}, MYTIMEOUT);
11131113

1114-
it(suiteName + "INSERT inline BLOB value (X'FFD1FFD2') and check stored data [XXX SKIP FINAL CHECK on default Android NDK access implementation due to CRASH ISSUE; OTHER PLUGIN ISSUES REPRODUCED: missing result column data; SELECT BLOB VALUE ERROR on Android & Windows; missing result column data on iOS/macOS]", function(done) {
1114+
it(suiteName + "INSERT inline BLOB value (X'FFD1FFD2') and check stored data [XXX SKIP FINAL SELECT CHECK on default Android NDK access implementation due to CRASH ISSUE; OTHER PLUGIN ISSUES REPRODUCED: missing result column data; SELECT BLOB VALUE ERROR on Android & Windows; missing result column data on iOS/macOS]", function(done) {
11151115
var db = openDatabase('INSERT-inline-BLOB-value-FFD1FFD2-and-check-stored-data.db', '1.0', 'Demo', DEFAULT_SIZE);
11161116

11171117
db.transaction(function(tx) {
@@ -1593,7 +1593,7 @@ var mytests = function() {
15931593
it(suiteName +
15941594
' handles UNICODE \\u2028 line separator correctly in database', function (done) {
15951595
if (!isWebSql && !isWindows && isAndroid) pending('SKIP for Android plugin (cordova-android 6.x BUG: cordova/cordova-discuss#57)');
1596-
if (!isWebSql && !isWindows && !isAndroid) pending('SKIP for iOS/macOS plugin (Cordova BUG: CB-9435)');
1596+
if (!isWebSql && (isAppleMobileOS || isMac)) pending('SKIP for iOS/macOS plugin (Cordova BUG: CB-9435)');
15971597

15981598
var db = openDatabase('UNICODE-line-separator-INSERT-test.db');
15991599

spec/www/spec/sql-batch-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ var mytests = function() {
321321
}, MYTIMEOUT);
322322

323323
it(suiteName + 'sql batch with changing argument value [TBD POSSIBLY INCONSISTENT BEHAVIOR]', function(done) {
324-
var db = openDatabase('sql-batch-with-changing-sql-test.db');
324+
var db = openDatabase('sql-batch-with-changing-argument-value-test.db');
325325

326326
var mybatch = [
327327
'DROP TABLE IF EXISTS MyTable',

spec/www/spec/tx-semantics-test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ var mytests = function() {
271271
expect(rs4.insertId).toBe(1);
272272
} catch(ex) {
273273
// SHOULD NOT CATCH EXCEPTION on plugin:
274-
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin with message: ' + e.message).toBe('--');
274+
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin with message: ' + ex.message).toBe('--');
275275
expect(ex).toBeDefined();
276276
expect(ex.message).toBeDefined();
277277
// FUTURE TBD check message
@@ -297,9 +297,9 @@ var mytests = function() {
297297

298298
if (!(isAndroid && isImpl2))
299299
expect(rs5.insertId).toBe(1);
300-
} catch(e) {
300+
} catch(ex) {
301301
// SHOULD NOT CATCH EXCEPTION on plugin:
302-
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin').toBe('--');
302+
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin with message: ' + ex.message).toBe('--');
303303
// XXX TODO CHECK message, etc.
304304
}
305305

0 commit comments

Comments
 (0)