mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added no log to logger
This commit is contained in:
parent
f5ad460e24
commit
ea459d05e4
2 changed files with 24 additions and 2 deletions
15
src/tests/shouldLog.test.ts
Normal file
15
src/tests/shouldLog.test.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { shouldLog } from '../utils/logger'
|
||||
|
||||
const noLogIds = ['1', '2', '10', '40']
|
||||
|
||||
const truthy = [1, 2, '10', '40']
|
||||
const falsey = [5, '55', 47832, 'fhs']
|
||||
|
||||
test('ShouldLog works', () => {
|
||||
truthy.forEach((x) => {
|
||||
expect(shouldLog(x, noLogIds)).toBeTruthy()
|
||||
})
|
||||
falsey.forEach((x) => {
|
||||
expect(shouldLog(x, noLogIds)).toBeFalsy()
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue