mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
fix(test): sandboxed-module -> log4js-node version
This commit is contained in:
parent
5f8fc12869
commit
8f7fde9da0
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
sandbox.configure({
|
||||
sourceTransformers: {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('log4js configure', (batch) => {
|
||||
batch.test('when configuration file loaded via LOG4JS_CONFIG env variable', (t) => {
|
||||
|
||||
@ -10,7 +10,7 @@ const debug = require('debug')('log4js:test.configuration-validation');
|
||||
|
||||
const testAppender = (label, result) => ({
|
||||
configure: function (config, layouts, findAppender) {
|
||||
debug(`testAppender(${label}).configure called`);
|
||||
debug(`testAppender(${label}).configure called, with config: ${util.inspect(config)}`);
|
||||
result.configureCalled = true;
|
||||
result.type = config.type;
|
||||
result.label = label;
|
||||
@ -334,8 +334,6 @@ test('log4js configuration validation', (batch) => {
|
||||
t.type(result.layouts.basicLayout, 'function');
|
||||
t.type(result.findAppender, 'function');
|
||||
t.type(result.findAppender('thing2'), 'object');
|
||||
debug(`thing2: ${util.inspect(result.findAppender('thing2'))}`);
|
||||
t.type(result.findAppender('thing2').type, 'notCheese');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('log4js console appender', (batch) => {
|
||||
batch.test('should output to console', (t) => {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('default settings', (t) => {
|
||||
const output = [];
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('file appender SIGHUP', (t) => {
|
||||
let closeCalled = 0;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
const test = require('tap').test;
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
const log4js = require('../../lib/log4js');
|
||||
const zlib = require('zlib');
|
||||
const EOL = require('os').EOL || '\n';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
const realLayouts = require('../../lib/layouts');
|
||||
|
||||
const setupLogging = function (options, category, compressedLength) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const lastRequest = {};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const fakeAxios = {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const fakeDgram = {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
const recording = require('../../lib/appenders/recording');
|
||||
|
||||
test('log4js', (batch) => {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
const layouts = require('../../lib/layouts');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const fakeAxios = {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const udpSent = {};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
const test = require('tap').test;
|
||||
const layouts = require('../../lib/layouts');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const msgs = [];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
const test = require('tap').test;
|
||||
const log4js = require('../../lib/log4js');
|
||||
const net = require('net');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('multiprocess appender shutdown (master)', { timeout: 2000 }, (t) => {
|
||||
log4js.configure({
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
const recording = require('../../lib/appenders/recording');
|
||||
|
||||
function makeFakeNet() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const fakeRabbitmq = {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
const test = require('tap').test;
|
||||
// const log4js = require('../../lib/log4js');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
const fakeRedis = {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('tap').test;
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
const realLayouts = require('../../lib/layouts');
|
||||
|
||||
function setupLogging(category, options) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
const test = require('tap').test;
|
||||
const realLayouts = require('../../lib/layouts');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
function setupLogging(category, options, errorOnSend) {
|
||||
const msgs = [];
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
const test = require('tap').test;
|
||||
const layouts = require('../../lib/layouts');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('stderr appender', (t) => {
|
||||
const output = [];
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
const test = require('tap').test;
|
||||
const layouts = require('../../lib/layouts');
|
||||
const sandbox = require('sandboxed-module');
|
||||
const sandbox = require('@log4js-node/sandboxed-module');
|
||||
|
||||
test('stdout appender', (t) => {
|
||||
const output = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user