Fixup all the tests

This commit is contained in:
Nick O'Leary
2018-08-20 16:17:24 +01:00
parent 998bf92ad4
commit 38a1291c5b
113 changed files with 458 additions and 250 deletions

View File

@@ -14,6 +14,8 @@
* limitations under the License.
**/
var NR_TEST_UTILS = require("nr-test-utils");
describe("storage/localfilesystem/projects/Project", function() {
it.skip("NEEDS TESTS WRITING",function() {});
})

View File

@@ -16,7 +16,8 @@
var should = require("should");
var defaultFileSet = require("../../../../../../red/runtime/storage/localfilesystem/projects/defaultFileSet");
var NR_TEST_UTILS = require("nr-test-utils");
var defaultFileSet = NR_TEST_UTILS.require("@node-red/runtime/lib/storage/localfilesystem/projects/defaultFileSet");
describe('storage/localfilesystem/projects/defaultFileSet', function() {
var runtime = {

View File

@@ -17,7 +17,8 @@
var should = require("should");
var sinon = require("sinon");
var authCache = require("../../../../../../../red/runtime/storage/localfilesystem/projects/git/authCache")
var NR_TEST_UTILS = require("nr-test-utils");
var authCache = NR_TEST_UTILS.require("@node-red/runtime/lib/storage/localfilesystem/projects/git/authCache")
describe("localfilesystem/projects/git/authCache", function() {

View File

@@ -22,7 +22,9 @@ var sinon = require("sinon");
var child_process = require("child_process");
var fs = require("fs-extra");
var authServer = require("../../../../../../../red/runtime/storage/localfilesystem/projects/git/authServer");
var NR_TEST_UTILS = require("nr-test-utils");
var authServer = NR_TEST_UTILS.require("@node-red/runtime/lib/storage/localfilesystem/projects/git/authServer");
var sendPrompt = function(localPath, prompt) {

View File

@@ -22,7 +22,9 @@ var sinon = require("sinon");
var child_process = require("child_process");
var fs = require("fs-extra");
var authWriter = "../../../../../../../red/runtime/storage/localfilesystem/projects/git/authWriter";
var NR_TEST_UTILS = require("nr-test-utils");
var authWriter = NR_TEST_UTILS.resolve("@node-red/runtime/lib/storage/localfilesystem/projects/git/authWriter");
function getListenPath() {
var seed = (0x100000+Math.random()*0x999999).toString(16);

View File

@@ -14,6 +14,8 @@
* limitations under the License.
**/
var NR_TEST_UTILS = require("nr-test-utils");
describe("storage/localfilesystem/projects/git/index", function() {
it.skip("NEEDS TESTS WRITING",function() {});
})

View File

@@ -14,6 +14,8 @@
* limitations under the License.
**/
var NR_TEST_UTILS = require("nr-test-utils");
describe("storage/localfilesystem/projects/index", function() {
it.skip("NEEDS TESTS WRITING",function() {});
})

View File

@@ -17,7 +17,8 @@ var should = require("should");
var fs = require('fs-extra');
var path = require('path');
var sshkeys = require("../../../../../../../red/runtime/storage/localfilesystem/projects/ssh");
var NR_TEST_UTILS = require("nr-test-utils");
var sshkeys = NR_TEST_UTILS.require("@node-red/runtime/lib/storage/localfilesystem/projects/ssh");
describe("storage/localfilesystem/projects/ssh", function() {
var userDir = path.join(__dirname,".testSSHKeyUserHome");

View File

@@ -19,7 +19,8 @@ var sinon = require("sinon");
var child_process = require('child_process');
var EventEmitter = require("events");
var keygen = require("../../../../../../../red/runtime/storage/localfilesystem/projects/ssh/keygen")
var NR_TEST_UTILS = require("nr-test-utils");
var keygen = NR_TEST_UTILS.require("@node-red/runtime/lib/storage/localfilesystem/projects/ssh/keygen")
describe("localfilesystem/projects/ssh/keygen", function() {