mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-14 22:04:51 +00:00
Refactor conditional function definitions
Function definitions within a condition do not function as expected thanks to JS hoisting, so it is better to avoid it, and keep ESLint happy as well. See discussion at #8622 with @pmario
This commit is contained in:
parent
517dae8242
commit
6dd6b7bef1
@ -6,14 +6,13 @@ tags: [[$:/tags/test-spec]]
|
||||
Tests the SQL tiddler database layer
|
||||
|
||||
\*/
|
||||
if($tw.node) {
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
if($tw.node) {
|
||||
|
||||
describe("SQL tiddler database with node-sqlite3-wasm", function() {
|
||||
runSqlDatabaseTests("wasm");
|
||||
});
|
||||
@ -107,6 +106,6 @@ function runSqlDatabaseTests(engine) {
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
}
|
||||
|
@ -6,14 +6,13 @@ tags: [[$:/tags/test-spec]]
|
||||
Tests the SQL tiddler store layer
|
||||
|
||||
\*/
|
||||
if($tw.node) {
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
if($tw.node) {
|
||||
|
||||
describe("SQL tiddler store with node-sqlite3-wasm", function() {
|
||||
runSqlStoreTests("wasm");
|
||||
});
|
||||
@ -145,6 +144,6 @@ function runSqlStoreTests(engine) {
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ Tests attachments.
|
||||
|
||||
\*/
|
||||
if(typeof window === 'undefined' && typeof process !== 'undefined' && process.versions && process.versions.node) {
|
||||
(function(){
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var assert = require('assert');
|
||||
@ -178,4 +179,5 @@ if(typeof window === 'undefined' && typeof process !== 'undefined' && process.ve
|
||||
});
|
||||
}
|
||||
})();
|
||||
})();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user