mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
15 lines
368 B
TypeScript
15 lines
368 B
TypeScript
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)).toBeFalsy()
|
|
})
|
|
falsey.forEach((x) => {
|
|
expect(shouldLog(x, noLogIds)).toBeTruthy()
|
|
})
|
|
})
|