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

@@ -0,0 +1,21 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
var NR_TEST_UTILS = require("nr-test-utils");
describe("node-red/red", function() {
it.skip("NEEDS TESTS WRITING",function() {});
});

View File

@@ -14,9 +14,13 @@
* limitations under the License.
**/
describe("util/i18n", function() {
it('can be required without errors', function() {
require("../../../red/util/i18n");
});
var NR_TEST_UTILS = require("nr-test-utils");
var i18n = NR_TEST_UTILS.require("@node-red/util").i18n;
describe("@node-red/util/i18n", function() {
it.skip('more tests needed', function(){})
});

View File

@@ -14,6 +14,6 @@
* limitations under the License.
**/
describe("util", function() {
describe("@node-red/util", function() {
it.skip('more tests needed', function(){})
});

View File

@@ -16,9 +16,13 @@
var should = require("should");
var sinon = require("sinon");
var util = require("util");
var log = require("../../../red/util/log");
describe("util/log", function() {
var NR_TEST_UTILS = require("nr-test-utils");
var log = NR_TEST_UTILS.require("@node-red/util").log;
describe("@node-red/util/log", function() {
beforeEach(function () {
var spy = sinon.stub(util, 'log', function(arg){});
var settings = {logging: { console: { level: 'metric', metrics: true } } };

View File

@@ -14,9 +14,12 @@
* limitations under the License.
**/
var should = require("should");
var util = require("../../../red/runtime/util");
describe("red/util", function() {
var NR_TEST_UTILS = require("nr-test-utils");
var util = NR_TEST_UTILS.require("@node-red/util").util;
describe("@node-red/util/util", function() {
describe('generateId', function() {
it('generates an id', function() {
var id = util.generateId();