From 45a479af30328de5ce2ec7fa8413484daf27e8bb Mon Sep 17 00:00:00 2001 From: Bernd Fuhrmann Date: Fri, 27 Sep 2024 10:02:42 +0200 Subject: [PATCH] fix tests --- test/index.test.js | 21 ++++++++++----------- test/legacy.test.js | 13 ++++++------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/test/index.test.js b/test/index.test.js index 71d9764..fa5f83c 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -73,7 +73,7 @@ describe('TransportStream', () => { }) }); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('should not log when no info object is provided', done => { @@ -100,7 +100,7 @@ describe('TransportStream', () => { }) }); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('should only log messages BELOW the level priority', done => { @@ -119,7 +119,7 @@ describe('TransportStream', () => { }); transport.levels = testLevels; - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('{ level } should be ignored when { handleExceptions: true }', () => { @@ -139,7 +139,7 @@ describe('TransportStream', () => { }); transport.levels = testLevels; - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); describe('when { exception: true } in info', () => { @@ -163,7 +163,7 @@ describe('TransportStream', () => { } }); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('should invoke log when { handleExceptions: true }', done => { @@ -190,8 +190,7 @@ describe('TransportStream', () => { next(); } }); - - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); }); }); @@ -223,7 +222,7 @@ describe('TransportStream', () => { }; transport.cork(); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); transport.uncork(); }); @@ -263,7 +262,7 @@ describe('TransportStream', () => { }; transport.cork(); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); transport.uncork(); }); @@ -294,7 +293,7 @@ describe('TransportStream', () => { }; transport.cork(); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); transport.uncork(); }); @@ -324,7 +323,7 @@ describe('TransportStream', () => { transport.cork(); transport.levels = testLevels; - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); transport.uncork(); }); }); diff --git a/test/legacy.test.js b/test/legacy.test.js index c014106..66d178e 100644 --- a/test/legacy.test.js +++ b/test/legacy.test.js @@ -105,7 +105,7 @@ describe('LegacyTransportStream', () => { done(); })); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('should only log messages BELOW the level priority', done => { @@ -126,7 +126,7 @@ describe('LegacyTransportStream', () => { })); transport.levels = testLevels; - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('{ level } should be ignored when { handleExceptions: true }', () => { @@ -147,7 +147,7 @@ describe('LegacyTransportStream', () => { })); transport.levels = testLevels; - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); describe('when { exception: true } in info', () => { @@ -169,7 +169,7 @@ describe('LegacyTransportStream', () => { done(); }); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); it('should invoke log when { handleExceptions: true }', done => { @@ -197,8 +197,7 @@ describe('LegacyTransportStream', () => { return done(); } }); - - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); }); }); }); @@ -228,7 +227,7 @@ describe('LegacyTransportStream', () => { }; transport.cork(); - expected.forEach(transport.write.bind(transport)); + expected.forEach(entry => transport.write.bind(transport)(entry)); transport.uncork(); }); });