standard-log 8.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -133
- package/{esm/console/createConsoleLogReporter.d.ts → cjs/console.d.ts} +5 -5
- package/cjs/console.d.ts.map +1 -0
- package/cjs/console.js +76 -0
- package/cjs/console.js.map +1 -0
- package/cjs/console.spec.d.ts +2 -0
- package/cjs/console.spec.d.ts.map +1 -0
- package/cjs/{console/createConsoleLogReporter.spec.js → console.spec.js} +50 -55
- package/cjs/console.spec.js.map +1 -0
- package/cjs/errors.d.ts +1 -11
- package/cjs/errors.d.ts.map +1 -1
- package/cjs/errors.js +3 -45
- package/cjs/errors.js.map +1 -1
- package/cjs/formatter.d.ts +6 -0
- package/cjs/formatter.d.ts.map +1 -0
- package/cjs/formatter.js +46 -0
- package/cjs/formatter.js.map +1 -0
- package/cjs/formatter.spec.d.ts +2 -0
- package/cjs/formatter.spec.d.ts.map +1 -0
- package/cjs/formatter.spec.js +32 -0
- package/cjs/formatter.spec.js.map +1 -0
- package/cjs/index.d.ts +5 -14
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +5 -14
- package/cjs/index.js.map +1 -1
- package/cjs/logLevels.d.ts +60 -0
- package/cjs/logLevels.d.ts.map +1 -0
- package/cjs/logLevels.js +87 -0
- package/cjs/logLevels.js.map +1 -0
- package/cjs/logStore.d.ts +20 -0
- package/cjs/logStore.d.ts.map +1 -0
- package/cjs/logStore.js +44 -0
- package/cjs/logStore.js.map +1 -0
- package/cjs/logStore.spec.d.ts +2 -0
- package/cjs/logStore.spec.d.ts.map +1 -0
- package/cjs/logStore.spec.js +93 -0
- package/cjs/logStore.spec.js.map +1 -0
- package/cjs/logger.d.ts +6 -0
- package/cjs/logger.d.ts.map +1 -0
- package/cjs/logger.js +97 -0
- package/cjs/logger.js.map +1 -0
- package/{esm/memory/MemoryLogReporter.d.ts → cjs/memory.d.ts} +2 -2
- package/cjs/memory.d.ts.map +1 -0
- package/cjs/memory.js +39 -0
- package/cjs/memory.js.map +1 -0
- package/cjs/memory.spec.d.ts +2 -0
- package/cjs/memory.spec.d.ts.map +1 -0
- package/cjs/memory.spec.js +115 -0
- package/cjs/memory.spec.js.map +1 -0
- package/cjs/package.json +1 -3
- package/cjs/platform.browser.d.ts +7 -0
- package/cjs/platform.browser.d.ts.map +1 -0
- package/cjs/platform.browser.js +11 -0
- package/cjs/platform.browser.js.map +1 -0
- package/cjs/platform.d.ts +8 -0
- package/cjs/platform.d.ts.map +1 -0
- package/cjs/platform.js +26 -0
- package/cjs/platform.js.map +1 -0
- package/cjs/platform.spec.d.ts +2 -0
- package/cjs/platform.spec.d.ts.map +1 -0
- package/cjs/platform.spec.js +22 -0
- package/cjs/platform.spec.js.map +1 -0
- package/cjs/standardLog.d.ts +21 -0
- package/cjs/standardLog.d.ts.map +1 -0
- package/cjs/standardLog.js +59 -0
- package/cjs/standardLog.js.map +1 -0
- package/cjs/standardLog.spec.d.ts +2 -0
- package/cjs/standardLog.spec.d.ts.map +1 -0
- package/cjs/standardLog.spec.js +548 -0
- package/cjs/standardLog.spec.js.map +1 -0
- package/cjs/testUtil.d.ts +7 -4
- package/cjs/testUtil.d.ts.map +1 -1
- package/cjs/testUtil.js +16 -13
- package/cjs/testUtil.js.map +1 -1
- package/cjs/types.d.ts +33 -24
- package/cjs/types.d.ts.map +1 -1
- package/cjs/types.js.map +1 -1
- package/dist/standard-log.es5.js +326 -1079
- package/dist/standard-log.es5.js.gz +0 -0
- package/dist/standard-log.es5.js.map +1 -1
- package/dist/standard-log.es5.js.map.gz +0 -0
- package/dist/standard-log.esm.js +309 -1146
- package/dist/standard-log.esm.js.gz +0 -0
- package/dist/standard-log.esm.js.map +1 -1
- package/dist/standard-log.esm.js.map.gz +0 -0
- package/{cjs/console/createConsoleLogReporter.d.ts → esm/console.d.ts} +5 -5
- package/esm/console.d.ts.map +1 -0
- package/esm/{console/polyfilledConsole.js → console.js} +36 -4
- package/esm/console.js.map +1 -0
- package/esm/console.spec.d.ts +2 -0
- package/esm/console.spec.d.ts.map +1 -0
- package/esm/{console/createConsoleLogReporter.spec.js → console.spec.js} +50 -52
- package/esm/console.spec.js.map +1 -0
- package/esm/errors.d.ts +1 -11
- package/esm/errors.d.ts.map +1 -1
- package/esm/errors.js +2 -36
- package/esm/errors.js.map +1 -1
- package/esm/formatter.d.ts +6 -0
- package/esm/formatter.d.ts.map +1 -0
- package/esm/{formatter/createTimestampFormatter.js → formatter.js} +10 -2
- package/esm/formatter.js.map +1 -0
- package/esm/formatter.spec.d.ts +2 -0
- package/esm/formatter.spec.d.ts.map +1 -0
- package/esm/formatter.spec.js +30 -0
- package/esm/formatter.spec.js.map +1 -0
- package/esm/index.d.ts +5 -14
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +5 -14
- package/esm/index.js.map +1 -1
- package/esm/logLevels.d.ts +60 -0
- package/esm/logLevels.d.ts.map +1 -0
- package/esm/{logLevel.js → logLevels.js} +29 -3
- package/esm/logLevels.js.map +1 -0
- package/esm/logStore.d.ts +20 -0
- package/esm/logStore.d.ts.map +1 -0
- package/esm/logStore.js +37 -0
- package/esm/logStore.js.map +1 -0
- package/esm/logStore.spec.d.ts +2 -0
- package/esm/logStore.spec.d.ts.map +1 -0
- package/esm/logStore.spec.js +93 -0
- package/esm/logStore.spec.js.map +1 -0
- package/esm/logger.d.ts +6 -0
- package/esm/logger.d.ts.map +1 -0
- package/esm/logger.js +74 -0
- package/esm/logger.js.map +1 -0
- package/{cjs/memory/MemoryLogReporter.d.ts → esm/memory.d.ts} +2 -2
- package/esm/memory.d.ts.map +1 -0
- package/esm/memory.js +34 -0
- package/esm/memory.js.map +1 -0
- package/esm/memory.spec.d.ts +2 -0
- package/esm/memory.spec.d.ts.map +1 -0
- package/esm/memory.spec.js +110 -0
- package/esm/memory.spec.js.map +1 -0
- package/esm/platform.browser.d.ts +7 -0
- package/esm/platform.browser.d.ts.map +1 -0
- package/esm/platform.browser.js +6 -0
- package/esm/platform.browser.js.map +1 -0
- package/esm/platform.d.ts +8 -0
- package/esm/platform.d.ts.map +1 -0
- package/esm/platform.js +20 -0
- package/esm/platform.js.map +1 -0
- package/esm/platform.spec.d.ts +2 -0
- package/esm/platform.spec.d.ts.map +1 -0
- package/esm/{console/semverGt.spec.js → platform.spec.js} +2 -2
- package/esm/platform.spec.js.map +1 -0
- package/esm/standardLog.d.ts +21 -0
- package/esm/standardLog.d.ts.map +1 -0
- package/esm/standardLog.js +36 -0
- package/esm/standardLog.js.map +1 -0
- package/esm/standardLog.spec.d.ts +2 -0
- package/esm/standardLog.spec.d.ts.map +1 -0
- package/esm/standardLog.spec.js +446 -0
- package/esm/standardLog.spec.js.map +1 -0
- package/esm/testUtil.d.ts +7 -4
- package/esm/testUtil.d.ts.map +1 -1
- package/esm/testUtil.js +11 -11
- package/esm/testUtil.js.map +1 -1
- package/esm/types.d.ts +33 -24
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js.map +1 -1
- package/package.json +12 -20
- package/ts/console.ts +72 -0
- package/ts/errors.ts +2 -14
- package/ts/{formatter/createTimestampFormatter.ts → formatter.ts} +12 -1
- package/ts/index.ts +5 -14
- package/ts/{logLevel.ts → logLevels.ts} +20 -3
- package/ts/logStore.ts +52 -0
- package/ts/logger.ts +85 -0
- package/ts/memory.ts +47 -0
- package/ts/platform.browser.ts +8 -0
- package/ts/platform.ts +25 -0
- package/ts/standardLog.ts +54 -0
- package/ts/types.ts +39 -30
- package/cjs/LogEntry.d.ts +0 -7
- package/cjs/LogEntry.d.ts.map +0 -1
- package/cjs/LogEntry.js +0 -3
- package/cjs/LogEntry.js.map +0 -1
- package/cjs/captureLogs.d.ts +0 -4
- package/cjs/captureLogs.d.ts.map +0 -1
- package/cjs/captureLogs.js +0 -33
- package/cjs/captureLogs.js.map +0 -1
- package/cjs/captureLogs.spec.d.ts +0 -2
- package/cjs/captureLogs.spec.d.ts.map +0 -1
- package/cjs/captureLogs.spec.js +0 -117
- package/cjs/captureLogs.spec.js.map +0 -1
- package/cjs/config.d.ts +0 -12
- package/cjs/config.d.ts.map +0 -1
- package/cjs/config.js +0 -59
- package/cjs/config.js.map +0 -1
- package/cjs/config.spec.d.ts +0 -2
- package/cjs/config.spec.d.ts.map +0 -1
- package/cjs/config.spec.js +0 -66
- package/cjs/config.spec.js.map +0 -1
- package/cjs/configForTest.d.ts +0 -5
- package/cjs/configForTest.d.ts.map +0 -1
- package/cjs/configForTest.js +0 -18
- package/cjs/configForTest.js.map +0 -1
- package/cjs/configForTest.spec.d.ts +0 -2
- package/cjs/configForTest.spec.d.ts.map +0 -1
- package/cjs/configForTest.spec.js +0 -17
- package/cjs/configForTest.spec.js.map +0 -1
- package/cjs/console/createConsoleLogReporter.d.ts.map +0 -1
- package/cjs/console/createConsoleLogReporter.js +0 -42
- package/cjs/console/createConsoleLogReporter.js.map +0 -1
- package/cjs/console/createConsoleLogReporter.spec.d.ts +0 -2
- package/cjs/console/createConsoleLogReporter.spec.d.ts.map +0 -1
- package/cjs/console/createConsoleLogReporter.spec.js.map +0 -1
- package/cjs/console/index.d.ts +0 -4
- package/cjs/console/index.d.ts.map +0 -1
- package/cjs/console/index.js +0 -20
- package/cjs/console/index.js.map +0 -1
- package/cjs/console/isConsoleDebugAvailable.d.ts +0 -2
- package/cjs/console/isConsoleDebugAvailable.d.ts.map +0 -1
- package/cjs/console/isConsoleDebugAvailable.js +0 -20
- package/cjs/console/isConsoleDebugAvailable.js.map +0 -1
- package/cjs/console/polyfilledConsole.d.ts +0 -7
- package/cjs/console/polyfilledConsole.d.ts.map +0 -1
- package/cjs/console/polyfilledConsole.js +0 -41
- package/cjs/console/polyfilledConsole.js.map +0 -1
- package/cjs/console/semverGt.d.ts +0 -2
- package/cjs/console/semverGt.d.ts.map +0 -1
- package/cjs/console/semverGt.js +0 -13
- package/cjs/console/semverGt.js.map +0 -1
- package/cjs/console/semverGt.spec.d.ts +0 -2
- package/cjs/console/semverGt.spec.d.ts.map +0 -1
- package/cjs/console/semverGt.spec.js +0 -22
- package/cjs/console/semverGt.spec.js.map +0 -1
- package/cjs/console/toConsoleMethod.d.ts +0 -2
- package/cjs/console/toConsoleMethod.d.ts.map +0 -1
- package/cjs/console/toConsoleMethod.js +0 -22
- package/cjs/console/toConsoleMethod.js.map +0 -1
- package/cjs/console/types.d.ts +0 -3
- package/cjs/console/types.d.ts.map +0 -1
- package/cjs/console/types.js +0 -3
- package/cjs/console/types.js.map +0 -1
- package/cjs/customLogLevel.d.ts +0 -11
- package/cjs/customLogLevel.d.ts.map +0 -1
- package/cjs/customLogLevel.js +0 -38
- package/cjs/customLogLevel.js.map +0 -1
- package/cjs/customLogLevel.spec.d.ts +0 -2
- package/cjs/customLogLevel.spec.d.ts.map +0 -1
- package/cjs/customLogLevel.spec.js +0 -37
- package/cjs/customLogLevel.spec.js.map +0 -1
- package/cjs/formatter/createTimestampFormatter.d.ts +0 -3
- package/cjs/formatter/createTimestampFormatter.d.ts.map +0 -1
- package/cjs/formatter/createTimestampFormatter.js +0 -26
- package/cjs/formatter/createTimestampFormatter.js.map +0 -1
- package/cjs/formatter/createTimestampFormatter.spec.d.ts +0 -2
- package/cjs/formatter/createTimestampFormatter.spec.d.ts.map +0 -1
- package/cjs/formatter/createTimestampFormatter.spec.js +0 -23
- package/cjs/formatter/createTimestampFormatter.spec.js.map +0 -1
- package/cjs/formatter/formatLogLevel.d.ts +0 -2
- package/cjs/formatter/formatLogLevel.d.ts.map +0 -1
- package/cjs/formatter/formatLogLevel.js +0 -10
- package/cjs/formatter/formatLogLevel.js.map +0 -1
- package/cjs/formatter/index.d.ts +0 -4
- package/cjs/formatter/index.d.ts.map +0 -1
- package/cjs/formatter/index.js +0 -20
- package/cjs/formatter/index.js.map +0 -1
- package/cjs/formatter/plainLogFormatter.d.ts +0 -3
- package/cjs/formatter/plainLogFormatter.d.ts.map +0 -1
- package/cjs/formatter/plainLogFormatter.js +0 -19
- package/cjs/formatter/plainLogFormatter.js.map +0 -1
- package/cjs/formatter/plainLogFormatter.spec.d.ts +0 -2
- package/cjs/formatter/plainLogFormatter.spec.d.ts.map +0 -1
- package/cjs/formatter/plainLogFormatter.spec.js +0 -9
- package/cjs/formatter/plainLogFormatter.spec.js.map +0 -1
- package/cjs/getDefaultReporter.browser.d.ts +0 -2
- package/cjs/getDefaultReporter.browser.d.ts.map +0 -1
- package/cjs/getDefaultReporter.browser.js +0 -15
- package/cjs/getDefaultReporter.browser.js.map +0 -1
- package/cjs/getDefaultReporter.d.ts +0 -2
- package/cjs/getDefaultReporter.d.ts.map +0 -1
- package/cjs/getDefaultReporter.js +0 -19
- package/cjs/getDefaultReporter.js.map +0 -1
- package/cjs/getLogModeFromEnvironment.browser.d.ts +0 -3
- package/cjs/getLogModeFromEnvironment.browser.d.ts.map +0 -1
- package/cjs/getLogModeFromEnvironment.browser.js +0 -9
- package/cjs/getLogModeFromEnvironment.browser.js.map +0 -1
- package/cjs/getLogModeFromEnvironment.d.ts +0 -3
- package/cjs/getLogModeFromEnvironment.d.ts.map +0 -1
- package/cjs/getLogModeFromEnvironment.js +0 -17
- package/cjs/getLogModeFromEnvironment.js.map +0 -1
- package/cjs/getLogModeFromEnvironment.spec.d.ts +0 -2
- package/cjs/getLogModeFromEnvironment.spec.d.ts.map +0 -1
- package/cjs/getLogModeFromEnvironment.spec.js +0 -19
- package/cjs/getLogModeFromEnvironment.spec.js.map +0 -1
- package/cjs/getLogger.d.ts +0 -9
- package/cjs/getLogger.d.ts.map +0 -1
- package/cjs/getLogger.js +0 -103
- package/cjs/getLogger.js.map +0 -1
- package/cjs/getLogger.spec.d.ts +0 -2
- package/cjs/getLogger.spec.d.ts.map +0 -1
- package/cjs/getLogger.spec.js +0 -481
- package/cjs/getLogger.spec.js.map +0 -1
- package/cjs/getLoggers.d.ts +0 -7
- package/cjs/getLoggers.d.ts.map +0 -1
- package/cjs/getLoggers.js +0 -15
- package/cjs/getLoggers.js.map +0 -1
- package/cjs/logLevel.d.ts +0 -106
- package/cjs/logLevel.d.ts.map +0 -1
- package/cjs/logLevel.js +0 -59
- package/cjs/logLevel.js.map +0 -1
- package/cjs/logLevel.spec.d.ts +0 -2
- package/cjs/logLevel.spec.d.ts.map +0 -1
- package/cjs/logLevel.spec.js +0 -195
- package/cjs/logLevel.spec.js.map +0 -1
- package/cjs/logLevelFn.d.ts +0 -20
- package/cjs/logLevelFn.d.ts.map +0 -1
- package/cjs/logLevelFn.js +0 -76
- package/cjs/logLevelFn.js.map +0 -1
- package/cjs/logReporter.d.ts +0 -7
- package/cjs/logReporter.d.ts.map +0 -1
- package/cjs/logReporter.js +0 -29
- package/cjs/logReporter.js.map +0 -1
- package/cjs/logReporter.spec.d.ts +0 -2
- package/cjs/logReporter.spec.d.ts.map +0 -1
- package/cjs/logReporter.spec.js +0 -86
- package/cjs/logReporter.spec.js.map +0 -1
- package/cjs/logReporterInternal.d.ts +0 -3
- package/cjs/logReporterInternal.d.ts.map +0 -1
- package/cjs/logReporterInternal.js +0 -23
- package/cjs/logReporterInternal.js.map +0 -1
- package/cjs/memory/MemoryLogReporter.d.ts.map +0 -1
- package/cjs/memory/MemoryLogReporter.js +0 -56
- package/cjs/memory/MemoryLogReporter.js.map +0 -1
- package/cjs/memory/MemoryLogReporter.spec.d.ts +0 -2
- package/cjs/memory/MemoryLogReporter.spec.d.ts.map +0 -1
- package/cjs/memory/MemoryLogReporter.spec.js +0 -111
- package/cjs/memory/MemoryLogReporter.spec.js.map +0 -1
- package/cjs/memory/index.d.ts +0 -3
- package/cjs/memory/index.d.ts.map +0 -1
- package/cjs/memory/index.js +0 -19
- package/cjs/memory/index.js.map +0 -1
- package/cjs/memory/logEntriesToString.d.ts +0 -3
- package/cjs/memory/logEntriesToString.d.ts.map +0 -1
- package/cjs/memory/logEntriesToString.js +0 -10
- package/cjs/memory/logEntriesToString.js.map +0 -1
- package/cjs/memory/logEntriesToString.spec.d.ts +0 -2
- package/cjs/memory/logEntriesToString.spec.d.ts.map +0 -1
- package/cjs/memory/logEntriesToString.spec.js +0 -36
- package/cjs/memory/logEntriesToString.spec.js.map +0 -1
- package/cjs/memory/toInspectStringForObject.d.ts +0 -3
- package/cjs/memory/toInspectStringForObject.d.ts.map +0 -1
- package/cjs/memory/toInspectStringForObject.js +0 -17
- package/cjs/memory/toInspectStringForObject.js.map +0 -1
- package/cjs/shouldLog.d.ts +0 -8
- package/cjs/shouldLog.d.ts.map +0 -1
- package/cjs/shouldLog.js +0 -14
- package/cjs/shouldLog.js.map +0 -1
- package/cjs/store.d.ts +0 -3
- package/cjs/store.d.ts.map +0 -1
- package/cjs/store.js +0 -27
- package/cjs/store.js.map +0 -1
- package/cjs/suppressLogs.d.ts +0 -6
- package/cjs/suppressLogs.d.ts.map +0 -1
- package/cjs/suppressLogs.js +0 -17
- package/cjs/suppressLogs.js.map +0 -1
- package/cjs/suppressLogs.spec.d.ts +0 -2
- package/cjs/suppressLogs.spec.d.ts.map +0 -1
- package/cjs/suppressLogs.spec.js +0 -31
- package/cjs/suppressLogs.spec.js.map +0 -1
- package/cjs/typesInternal.d.ts +0 -20
- package/cjs/typesInternal.d.ts.map +0 -1
- package/cjs/typesInternal.js +0 -3
- package/cjs/typesInternal.js.map +0 -1
- package/cjs/utils.d.ts +0 -5
- package/cjs/utils.d.ts.map +0 -1
- package/cjs/utils.js +0 -14
- package/cjs/utils.js.map +0 -1
- package/cjs/writeToReporters.d.ts +0 -6
- package/cjs/writeToReporters.d.ts.map +0 -1
- package/cjs/writeToReporters.js +0 -22
- package/cjs/writeToReporters.js.map +0 -1
- package/cjs/writeToReporters.spec.d.ts +0 -2
- package/cjs/writeToReporters.spec.d.ts.map +0 -1
- package/cjs/writeToReporters.spec.js +0 -59
- package/cjs/writeToReporters.spec.js.map +0 -1
- package/esm/LogEntry.d.ts +0 -7
- package/esm/LogEntry.d.ts.map +0 -1
- package/esm/LogEntry.js +0 -2
- package/esm/LogEntry.js.map +0 -1
- package/esm/captureLogs.d.ts +0 -4
- package/esm/captureLogs.d.ts.map +0 -1
- package/esm/captureLogs.js +0 -29
- package/esm/captureLogs.js.map +0 -1
- package/esm/captureLogs.spec.d.ts +0 -2
- package/esm/captureLogs.spec.d.ts.map +0 -1
- package/esm/captureLogs.spec.js +0 -45
- package/esm/captureLogs.spec.js.map +0 -1
- package/esm/config.d.ts +0 -12
- package/esm/config.d.ts.map +0 -1
- package/esm/config.js +0 -44
- package/esm/config.js.map +0 -1
- package/esm/config.spec.d.ts +0 -2
- package/esm/config.spec.d.ts.map +0 -1
- package/esm/config.spec.js +0 -61
- package/esm/config.spec.js.map +0 -1
- package/esm/configForTest.d.ts +0 -5
- package/esm/configForTest.d.ts.map +0 -1
- package/esm/configForTest.js +0 -14
- package/esm/configForTest.js.map +0 -1
- package/esm/configForTest.spec.d.ts +0 -2
- package/esm/configForTest.spec.d.ts.map +0 -1
- package/esm/configForTest.spec.js +0 -15
- package/esm/configForTest.spec.js.map +0 -1
- package/esm/console/createConsoleLogReporter.d.ts.map +0 -1
- package/esm/console/createConsoleLogReporter.js +0 -37
- package/esm/console/createConsoleLogReporter.js.map +0 -1
- package/esm/console/createConsoleLogReporter.spec.d.ts +0 -2
- package/esm/console/createConsoleLogReporter.spec.d.ts.map +0 -1
- package/esm/console/createConsoleLogReporter.spec.js.map +0 -1
- package/esm/console/index.d.ts +0 -4
- package/esm/console/index.d.ts.map +0 -1
- package/esm/console/index.js +0 -4
- package/esm/console/index.js.map +0 -1
- package/esm/console/isConsoleDebugAvailable.d.ts +0 -2
- package/esm/console/isConsoleDebugAvailable.d.ts.map +0 -1
- package/esm/console/isConsoleDebugAvailable.js +0 -13
- package/esm/console/isConsoleDebugAvailable.js.map +0 -1
- package/esm/console/polyfilledConsole.d.ts +0 -7
- package/esm/console/polyfilledConsole.d.ts.map +0 -1
- package/esm/console/polyfilledConsole.js.map +0 -1
- package/esm/console/semverGt.d.ts +0 -2
- package/esm/console/semverGt.d.ts.map +0 -1
- package/esm/console/semverGt.js +0 -9
- package/esm/console/semverGt.js.map +0 -1
- package/esm/console/semverGt.spec.d.ts +0 -2
- package/esm/console/semverGt.spec.d.ts.map +0 -1
- package/esm/console/semverGt.spec.js.map +0 -1
- package/esm/console/toConsoleMethod.d.ts +0 -2
- package/esm/console/toConsoleMethod.d.ts.map +0 -1
- package/esm/console/toConsoleMethod.js +0 -18
- package/esm/console/toConsoleMethod.js.map +0 -1
- package/esm/console/types.d.ts +0 -3
- package/esm/console/types.d.ts.map +0 -1
- package/esm/console/types.js +0 -2
- package/esm/console/types.js.map +0 -1
- package/esm/customLogLevel.d.ts +0 -11
- package/esm/customLogLevel.d.ts.map +0 -1
- package/esm/customLogLevel.js +0 -30
- package/esm/customLogLevel.js.map +0 -1
- package/esm/customLogLevel.spec.d.ts +0 -2
- package/esm/customLogLevel.spec.d.ts.map +0 -1
- package/esm/customLogLevel.spec.js +0 -32
- package/esm/customLogLevel.spec.js.map +0 -1
- package/esm/formatter/createTimestampFormatter.d.ts +0 -3
- package/esm/formatter/createTimestampFormatter.d.ts.map +0 -1
- package/esm/formatter/createTimestampFormatter.js.map +0 -1
- package/esm/formatter/createTimestampFormatter.spec.d.ts +0 -2
- package/esm/formatter/createTimestampFormatter.spec.d.ts.map +0 -1
- package/esm/formatter/createTimestampFormatter.spec.js +0 -21
- package/esm/formatter/createTimestampFormatter.spec.js.map +0 -1
- package/esm/formatter/formatLogLevel.d.ts +0 -2
- package/esm/formatter/formatLogLevel.d.ts.map +0 -1
- package/esm/formatter/formatLogLevel.js +0 -6
- package/esm/formatter/formatLogLevel.js.map +0 -1
- package/esm/formatter/index.d.ts +0 -4
- package/esm/formatter/index.d.ts.map +0 -1
- package/esm/formatter/index.js +0 -4
- package/esm/formatter/index.js.map +0 -1
- package/esm/formatter/plainLogFormatter.d.ts +0 -3
- package/esm/formatter/plainLogFormatter.d.ts.map +0 -1
- package/esm/formatter/plainLogFormatter.js +0 -5
- package/esm/formatter/plainLogFormatter.js.map +0 -1
- package/esm/formatter/plainLogFormatter.spec.d.ts +0 -2
- package/esm/formatter/plainLogFormatter.spec.d.ts.map +0 -1
- package/esm/formatter/plainLogFormatter.spec.js +0 -7
- package/esm/formatter/plainLogFormatter.spec.js.map +0 -1
- package/esm/getDefaultReporter.browser.d.ts +0 -2
- package/esm/getDefaultReporter.browser.d.ts.map +0 -1
- package/esm/getDefaultReporter.browser.js +0 -11
- package/esm/getDefaultReporter.browser.js.map +0 -1
- package/esm/getDefaultReporter.d.ts +0 -2
- package/esm/getDefaultReporter.d.ts.map +0 -1
- package/esm/getDefaultReporter.js +0 -15
- package/esm/getDefaultReporter.js.map +0 -1
- package/esm/getLogModeFromEnvironment.browser.d.ts +0 -3
- package/esm/getLogModeFromEnvironment.browser.d.ts.map +0 -1
- package/esm/getLogModeFromEnvironment.browser.js +0 -5
- package/esm/getLogModeFromEnvironment.browser.js.map +0 -1
- package/esm/getLogModeFromEnvironment.d.ts +0 -3
- package/esm/getLogModeFromEnvironment.d.ts.map +0 -1
- package/esm/getLogModeFromEnvironment.js +0 -13
- package/esm/getLogModeFromEnvironment.js.map +0 -1
- package/esm/getLogModeFromEnvironment.spec.d.ts +0 -2
- package/esm/getLogModeFromEnvironment.spec.d.ts.map +0 -1
- package/esm/getLogModeFromEnvironment.spec.js +0 -14
- package/esm/getLogModeFromEnvironment.spec.js.map +0 -1
- package/esm/getLogger.d.ts +0 -9
- package/esm/getLogger.d.ts.map +0 -1
- package/esm/getLogger.js +0 -78
- package/esm/getLogger.js.map +0 -1
- package/esm/getLogger.spec.d.ts +0 -2
- package/esm/getLogger.spec.d.ts.map +0 -1
- package/esm/getLogger.spec.js +0 -381
- package/esm/getLogger.spec.js.map +0 -1
- package/esm/getLoggers.d.ts +0 -7
- package/esm/getLoggers.d.ts.map +0 -1
- package/esm/getLoggers.js +0 -11
- package/esm/getLoggers.js.map +0 -1
- package/esm/logLevel.d.ts +0 -106
- package/esm/logLevel.d.ts.map +0 -1
- package/esm/logLevel.js.map +0 -1
- package/esm/logLevel.spec.d.ts +0 -2
- package/esm/logLevel.spec.d.ts.map +0 -1
- package/esm/logLevel.spec.js +0 -148
- package/esm/logLevel.spec.js.map +0 -1
- package/esm/logLevelFn.d.ts +0 -20
- package/esm/logLevelFn.d.ts.map +0 -1
- package/esm/logLevelFn.js +0 -67
- package/esm/logLevelFn.js.map +0 -1
- package/esm/logReporter.d.ts +0 -7
- package/esm/logReporter.d.ts.map +0 -1
- package/esm/logReporter.js +0 -21
- package/esm/logReporter.js.map +0 -1
- package/esm/logReporter.spec.d.ts +0 -2
- package/esm/logReporter.spec.d.ts.map +0 -1
- package/esm/logReporter.spec.js +0 -81
- package/esm/logReporter.spec.js.map +0 -1
- package/esm/logReporterInternal.d.ts +0 -3
- package/esm/logReporterInternal.d.ts.map +0 -1
- package/esm/logReporterInternal.js +0 -19
- package/esm/logReporterInternal.js.map +0 -1
- package/esm/memory/MemoryLogReporter.d.ts.map +0 -1
- package/esm/memory/MemoryLogReporter.js +0 -51
- package/esm/memory/MemoryLogReporter.js.map +0 -1
- package/esm/memory/MemoryLogReporter.spec.d.ts +0 -2
- package/esm/memory/MemoryLogReporter.spec.d.ts.map +0 -1
- package/esm/memory/MemoryLogReporter.spec.js +0 -98
- package/esm/memory/MemoryLogReporter.spec.js.map +0 -1
- package/esm/memory/index.d.ts +0 -3
- package/esm/memory/index.d.ts.map +0 -1
- package/esm/memory/index.js +0 -3
- package/esm/memory/index.js.map +0 -1
- package/esm/memory/logEntriesToString.d.ts +0 -3
- package/esm/memory/logEntriesToString.d.ts.map +0 -1
- package/esm/memory/logEntriesToString.js +0 -6
- package/esm/memory/logEntriesToString.js.map +0 -1
- package/esm/memory/logEntriesToString.spec.d.ts +0 -2
- package/esm/memory/logEntriesToString.spec.d.ts.map +0 -1
- package/esm/memory/logEntriesToString.spec.js +0 -42
- package/esm/memory/logEntriesToString.spec.js.map +0 -1
- package/esm/memory/toInspectStringForObject.d.ts +0 -3
- package/esm/memory/toInspectStringForObject.d.ts.map +0 -1
- package/esm/memory/toInspectStringForObject.js +0 -11
- package/esm/memory/toInspectStringForObject.js.map +0 -1
- package/esm/shouldLog.d.ts +0 -8
- package/esm/shouldLog.d.ts.map +0 -1
- package/esm/shouldLog.js +0 -10
- package/esm/shouldLog.js.map +0 -1
- package/esm/store.d.ts +0 -3
- package/esm/store.d.ts.map +0 -1
- package/esm/store.js +0 -24
- package/esm/store.js.map +0 -1
- package/esm/suppressLogs.d.ts +0 -6
- package/esm/suppressLogs.d.ts.map +0 -1
- package/esm/suppressLogs.js +0 -9
- package/esm/suppressLogs.js.map +0 -1
- package/esm/suppressLogs.spec.d.ts +0 -2
- package/esm/suppressLogs.spec.d.ts.map +0 -1
- package/esm/suppressLogs.spec.js +0 -29
- package/esm/suppressLogs.spec.js.map +0 -1
- package/esm/typesInternal.d.ts +0 -20
- package/esm/typesInternal.d.ts.map +0 -1
- package/esm/typesInternal.js +0 -2
- package/esm/typesInternal.js.map +0 -1
- package/esm/utils.d.ts +0 -5
- package/esm/utils.d.ts.map +0 -1
- package/esm/utils.js +0 -10
- package/esm/utils.js.map +0 -1
- package/esm/writeToReporters.d.ts +0 -6
- package/esm/writeToReporters.d.ts.map +0 -1
- package/esm/writeToReporters.js +0 -18
- package/esm/writeToReporters.js.map +0 -1
- package/esm/writeToReporters.spec.d.ts +0 -2
- package/esm/writeToReporters.spec.d.ts.map +0 -1
- package/esm/writeToReporters.spec.js +0 -9
- package/esm/writeToReporters.spec.js.map +0 -1
- package/ts/LogEntry.ts +0 -7
- package/ts/captureLogs.ts +0 -35
- package/ts/config.ts +0 -57
- package/ts/configForTest.ts +0 -16
- package/ts/console/createConsoleLogReporter.ts +0 -42
- package/ts/console/index.ts +0 -3
- package/ts/console/isConsoleDebugAvailable.ts +0 -11
- package/ts/console/polyfilledConsole.ts +0 -34
- package/ts/console/semverGt.ts +0 -9
- package/ts/console/toConsoleMethod.ts +0 -18
- package/ts/console/types.ts +0 -3
- package/ts/customLogLevel.ts +0 -35
- package/ts/formatter/formatLogLevel.ts +0 -6
- package/ts/formatter/index.ts +0 -3
- package/ts/formatter/plainLogFormatter.ts +0 -6
- package/ts/getDefaultReporter.browser.ts +0 -13
- package/ts/getDefaultReporter.ts +0 -15
- package/ts/getLogModeFromEnvironment.browser.ts +0 -6
- package/ts/getLogModeFromEnvironment.ts +0 -16
- package/ts/getLogger.ts +0 -92
- package/ts/getLoggers.ts +0 -12
- package/ts/logLevelFn.ts +0 -72
- package/ts/logReporter.ts +0 -26
- package/ts/logReporterInternal.ts +0 -18
- package/ts/memory/MemoryLogReporter.ts +0 -66
- package/ts/memory/index.ts +0 -2
- package/ts/memory/logEntriesToString.ts +0 -7
- package/ts/memory/toInspectStringForObject.ts +0 -13
- package/ts/shouldLog.ts +0 -11
- package/ts/store.ts +0 -25
- package/ts/suppressLogs.ts +0 -14
- package/ts/testUtil.ts +0 -19
- package/ts/typesInternal.ts +0 -21
- package/ts/utils.ts +0 -9
- package/ts/writeToReporters.ts +0 -20
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { assertron as a } from 'assertron';
|
|
2
|
+
import { InvalidId } from './errors.js';
|
|
3
|
+
import { logLevels, toLogLevelName } from './logLevels.js';
|
|
4
|
+
import { createMemoryLogReporter } from './memory.js';
|
|
5
|
+
import { createStandardLog, createStandardLogForTest, suppressLogs } from './standardLog.js';
|
|
6
|
+
import { assertSSF, wrapTest } from './testUtil.js';
|
|
7
|
+
describe('createStandardLog()', () => {
|
|
8
|
+
describe('logLevel', () => {
|
|
9
|
+
it('is default to info', () => {
|
|
10
|
+
const actual = createStandardLog();
|
|
11
|
+
expect(actual.logLevel).toBe(logLevels.info);
|
|
12
|
+
});
|
|
13
|
+
it('is readonly', () => {
|
|
14
|
+
const actual = createStandardLog();
|
|
15
|
+
a.throws(() => actual.logLevel = logLevels.planck, err => /only a getter/.test(err));
|
|
16
|
+
});
|
|
17
|
+
it('set logLevel from options', () => {
|
|
18
|
+
const actual = createStandardLog({ logLevel: logLevels.planck });
|
|
19
|
+
expect(actual.logLevel).toBe(logLevels.planck);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('custom levels', () => {
|
|
23
|
+
it('can define custom levels', () => {
|
|
24
|
+
const actual = createStandardLog({ customLevels: { urgent: 80 } });
|
|
25
|
+
expect(actual.toLogLevelName(80)).toBe('urgent');
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe('reporters', () => {
|
|
29
|
+
it('can specify reporter', () => {
|
|
30
|
+
const mem = createMemoryLogReporter();
|
|
31
|
+
const sl = createStandardLog({ reporters: [mem] });
|
|
32
|
+
const log = sl.getLogger(['x']);
|
|
33
|
+
log.info('abc');
|
|
34
|
+
expect(mem.logs.length).toBe(1);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
describe('createStandardLogForTest()', () => {
|
|
39
|
+
it('returns with memory reporter', () => {
|
|
40
|
+
const { reporter } = createStandardLogForTest();
|
|
41
|
+
expect(reporter.getLogMessageWithLevel()).toBe('');
|
|
42
|
+
});
|
|
43
|
+
it('defaults to debug', () => {
|
|
44
|
+
const store = createStandardLogForTest();
|
|
45
|
+
expect(store.logLevel).toBe(logLevels.debug);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
describe('getLogger()', () => {
|
|
49
|
+
it('supports id with alphanumeric and :_-.', () => {
|
|
50
|
+
const sl = createStandardLog();
|
|
51
|
+
sl.getLogger(['abcdefghijklmnopqrstuvwxyz:-_.1234567890']);
|
|
52
|
+
});
|
|
53
|
+
it('supports id with unicode', () => {
|
|
54
|
+
const sl = createStandardLog();
|
|
55
|
+
sl.getLogger(['ミク香港']);
|
|
56
|
+
});
|
|
57
|
+
it('supports id with @, \\ and /', () => {
|
|
58
|
+
const sl = createStandardLog();
|
|
59
|
+
sl.getLogger(['@unional/fixture']);
|
|
60
|
+
sl.getLogger([`a\\b\\c`]);
|
|
61
|
+
});
|
|
62
|
+
it.each('`~!#$%^&*()=+|[]{}<>,?'.split(''))('throws if id has unsupported character %s', (char) => {
|
|
63
|
+
const sl = createStandardLog();
|
|
64
|
+
a.throws(() => sl.getLogger([char]), InvalidId);
|
|
65
|
+
});
|
|
66
|
+
it('throw InvalidId with ssf to the call site', () => {
|
|
67
|
+
const sl = createStandardLog();
|
|
68
|
+
const err = a.throws(() => sl.getLogger(['!']), InvalidId);
|
|
69
|
+
assertSSF(err, __filename);
|
|
70
|
+
});
|
|
71
|
+
test('id is readonly', () => {
|
|
72
|
+
const sl = createStandardLog();
|
|
73
|
+
const log = sl.getLogger(['id is readonly']);
|
|
74
|
+
a.throws(() => log.id = 'b');
|
|
75
|
+
});
|
|
76
|
+
test('get logger with same name gets the same instance', () => {
|
|
77
|
+
const sl = createStandardLog();
|
|
78
|
+
const expected = sl.getLogger(['same-inst']);
|
|
79
|
+
const actual = sl.getLogger(['same-inst']);
|
|
80
|
+
expect(actual).toBe(expected);
|
|
81
|
+
});
|
|
82
|
+
it('can specify local log level', () => {
|
|
83
|
+
const sl = createStandardLog();
|
|
84
|
+
const log = sl.getLogger(['local', { level: logLevels.trace }]);
|
|
85
|
+
expect(log.level).toBe(logLevels.trace);
|
|
86
|
+
});
|
|
87
|
+
test('new logger will get custom level', () => {
|
|
88
|
+
const sl = createStandardLog({ customLevels: { 'to_logger': 1234 } });
|
|
89
|
+
const actual = sl.getLogger(['to_logger_logger']);
|
|
90
|
+
expect(typeof actual.to_logger).toBe('function');
|
|
91
|
+
});
|
|
92
|
+
it('Logger have at least the default log method names', () => {
|
|
93
|
+
function wrapper(options) {
|
|
94
|
+
const sl = createStandardLog(options);
|
|
95
|
+
// since `N` is generic, just `Logger<N>` will not have the default log method names.
|
|
96
|
+
const log = sl.getLogger(['local']);
|
|
97
|
+
expect(log.info).toBeDefined();
|
|
98
|
+
return sl;
|
|
99
|
+
}
|
|
100
|
+
const sl = wrapper({ customLevels: { 'cust': 123 } });
|
|
101
|
+
const actual = sl.getLogger(['c']);
|
|
102
|
+
expect(actual.cust).toBeDefined();
|
|
103
|
+
});
|
|
104
|
+
describe('log levels', () => {
|
|
105
|
+
async function assertLoggedAtLevel(sl, method, level) {
|
|
106
|
+
const log = sl.getLogger([method]);
|
|
107
|
+
const msg = `should log on level: ${level}`;
|
|
108
|
+
log[method](msg);
|
|
109
|
+
a.satisfies(sl.reporter.logs, [{ id: method, level: sl.toLogLevel(method), args: [msg] }]);
|
|
110
|
+
}
|
|
111
|
+
async function assertNotLoggedAtLevel(sl, method, level) {
|
|
112
|
+
const log = sl.getLogger([method]);
|
|
113
|
+
log[method](`should not log on level: ${level}`);
|
|
114
|
+
expect(sl.reporter.logs.length).toBe(0);
|
|
115
|
+
}
|
|
116
|
+
async function assertLoggedAtLocalLevel(sl, method, localLevel) {
|
|
117
|
+
const log = sl.getLogger([method, { level: localLevel }]);
|
|
118
|
+
const msg = `should log on level: ${localLevel}`;
|
|
119
|
+
log[method](msg);
|
|
120
|
+
a.satisfies(sl.reporter.logs, [{ id: log.id, level: sl.toLogLevel(method), args: [msg] }]);
|
|
121
|
+
}
|
|
122
|
+
async function assertNotLoggedAtLocalLevel(sl, method, localLevel) {
|
|
123
|
+
const log = sl.getLogger([method, { level: localLevel }]);
|
|
124
|
+
log[method](`should not log on level: ${localLevel}`);
|
|
125
|
+
expect(sl.reporter.logs.length).toBe(0);
|
|
126
|
+
}
|
|
127
|
+
async function assertLoggedAtCallLevel(sl, method, callLevel) {
|
|
128
|
+
const log = sl.getLogger([method]);
|
|
129
|
+
let actual = false;
|
|
130
|
+
log.on(callLevel, () => actual = true);
|
|
131
|
+
expect(actual).toBe(true);
|
|
132
|
+
}
|
|
133
|
+
async function assertNotLoggedAtCallLevel(sl, method, callLevel, actualLevel) {
|
|
134
|
+
const log = sl.getLogger([method]);
|
|
135
|
+
log.on(callLevel, () => { throw new Error(`should not log at level ${actualLevel}`); });
|
|
136
|
+
}
|
|
137
|
+
async function assertLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel) {
|
|
138
|
+
const log = sl.getLogger([method, { level: localLevel }]);
|
|
139
|
+
let actual = false;
|
|
140
|
+
log.on(callLevel, () => actual = true);
|
|
141
|
+
expect(actual).toBe(true);
|
|
142
|
+
}
|
|
143
|
+
async function assertNotLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel) {
|
|
144
|
+
const log = sl.getLogger([method, { level: localLevel }]);
|
|
145
|
+
log.on(callLevel, () => { throw new Error(`should not log at level ${localLevel}`); });
|
|
146
|
+
}
|
|
147
|
+
const shouldLog = wrapTest((test) => (method, level) => {
|
|
148
|
+
const sl = createStandardLogForTest(level);
|
|
149
|
+
const name = sl.toLogLevelName(level);
|
|
150
|
+
test(`${method}() should log on level: ${name} (${level})`, () => {
|
|
151
|
+
return assertLoggedAtLevel(sl, method, level);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
const shouldNotLog = wrapTest((test) => (method, level) => {
|
|
155
|
+
const sl = createStandardLogForTest(level);
|
|
156
|
+
const name = sl.toLogLevelName(level);
|
|
157
|
+
test(`${method}() should not log on level: ${name} (${level})`, () => {
|
|
158
|
+
return assertNotLoggedAtLevel(sl, method, level);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
const shouldLogWithLocalLevelOverride = wrapTest((test) => (method, localLevel) => {
|
|
162
|
+
const localName = toLogLevelName(localLevel);
|
|
163
|
+
[logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {
|
|
164
|
+
const globalName = toLogLevelName(globalLevel) || 'none';
|
|
165
|
+
test(`${method}() should log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {
|
|
166
|
+
const sl = createStandardLogForTest(globalLevel);
|
|
167
|
+
return assertLoggedAtLocalLevel(sl, method, localLevel);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
const shouldNotLogWithLocalLevelOverride = wrapTest((test) => (method, localLevel) => {
|
|
172
|
+
const localName = toLogLevelName(localLevel);
|
|
173
|
+
[logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {
|
|
174
|
+
const globalName = toLogLevelName(globalLevel) || 'none';
|
|
175
|
+
test(`${method}() should not log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {
|
|
176
|
+
const sl = createStandardLogForTest(globalLevel);
|
|
177
|
+
return assertNotLoggedAtLocalLevel(sl, method, localLevel);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
const shouldCallLogFunction = wrapTest((test) => (callLevel, actualLevel) => {
|
|
182
|
+
const method = toLogLevelName(callLevel);
|
|
183
|
+
const name = toLogLevelName(actualLevel);
|
|
184
|
+
test(`${method}() should call log function on level: ${name} (${actualLevel})`, () => {
|
|
185
|
+
const sl = createStandardLogForTest(actualLevel);
|
|
186
|
+
return assertLoggedAtCallLevel(sl, method, callLevel);
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
const shouldNotCallLogFunction = wrapTest((test) => (callLevel, actualLevel) => {
|
|
190
|
+
const method = toLogLevelName(callLevel);
|
|
191
|
+
const name = toLogLevelName(actualLevel);
|
|
192
|
+
test(`${method}() should not call log function on level: ${name} (${actualLevel})`, () => {
|
|
193
|
+
const sl = createStandardLogForTest(actualLevel);
|
|
194
|
+
return assertNotLoggedAtCallLevel(sl, method, callLevel, actualLevel);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
const shouldCallLogFunctionWithLocalLevelOverride = wrapTest((test) => (callLevel, localLevel) => {
|
|
198
|
+
const method = toLogLevelName(callLevel);
|
|
199
|
+
const localName = toLogLevelName(localLevel);
|
|
200
|
+
[logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {
|
|
201
|
+
const globalName = toLogLevelName(globalLevel) || 'none';
|
|
202
|
+
test(`${method}() should log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {
|
|
203
|
+
const sl = createStandardLogForTest(globalLevel);
|
|
204
|
+
return assertLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel);
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
const shouldNotCallLogFunctionWithLocalLevelOverride = wrapTest((test) => (callLevel, localLevel) => {
|
|
209
|
+
const method = toLogLevelName(callLevel);
|
|
210
|
+
const localName = toLogLevelName(localLevel);
|
|
211
|
+
[logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {
|
|
212
|
+
const globalName = toLogLevelName(globalLevel) || 'none';
|
|
213
|
+
test(`${method}() should not log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {
|
|
214
|
+
const sl = createStandardLogForTest(globalLevel);
|
|
215
|
+
return assertNotLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
shouldNotLog('error', logLevels.none);
|
|
220
|
+
shouldLog('error', logLevels.error);
|
|
221
|
+
shouldLog('error', logLevels.warn);
|
|
222
|
+
shouldLog('error', logLevels.info);
|
|
223
|
+
shouldLog('error', logLevels.debug);
|
|
224
|
+
shouldNotLogWithLocalLevelOverride('error', logLevels.none);
|
|
225
|
+
shouldLogWithLocalLevelOverride('error', logLevels.error);
|
|
226
|
+
shouldLogWithLocalLevelOverride('error', logLevels.warn);
|
|
227
|
+
shouldLogWithLocalLevelOverride('error', logLevels.info);
|
|
228
|
+
shouldLogWithLocalLevelOverride('error', logLevels.debug);
|
|
229
|
+
shouldNotLog('warn', logLevels.none);
|
|
230
|
+
shouldNotLog('warn', logLevels.error);
|
|
231
|
+
shouldLog('warn', logLevels.warn);
|
|
232
|
+
shouldLog('warn', logLevels.info);
|
|
233
|
+
shouldLog('warn', logLevels.debug);
|
|
234
|
+
shouldNotLogWithLocalLevelOverride('warn', logLevels.none);
|
|
235
|
+
shouldNotLogWithLocalLevelOverride('warn', logLevels.error);
|
|
236
|
+
shouldLogWithLocalLevelOverride('warn', logLevels.warn);
|
|
237
|
+
shouldLogWithLocalLevelOverride('warn', logLevels.info);
|
|
238
|
+
shouldLogWithLocalLevelOverride('warn', logLevels.debug);
|
|
239
|
+
shouldNotLog('info', logLevels.none);
|
|
240
|
+
shouldNotLog('info', logLevels.error);
|
|
241
|
+
shouldNotLog('info', logLevels.warn);
|
|
242
|
+
shouldLog('info', logLevels.info);
|
|
243
|
+
shouldLog('info', logLevels.debug);
|
|
244
|
+
shouldNotLogWithLocalLevelOverride('info', logLevels.none);
|
|
245
|
+
shouldNotLogWithLocalLevelOverride('info', logLevels.error);
|
|
246
|
+
shouldNotLogWithLocalLevelOverride('info', logLevels.warn);
|
|
247
|
+
shouldLogWithLocalLevelOverride('info', logLevels.info);
|
|
248
|
+
shouldLogWithLocalLevelOverride('info', logLevels.debug);
|
|
249
|
+
shouldNotLog('debug', logLevels.none);
|
|
250
|
+
shouldNotLog('debug', logLevels.error);
|
|
251
|
+
shouldNotLog('debug', logLevels.warn);
|
|
252
|
+
shouldNotLog('debug', logLevels.info);
|
|
253
|
+
shouldLog('debug', logLevels.debug);
|
|
254
|
+
shouldNotLogWithLocalLevelOverride('debug', logLevels.none);
|
|
255
|
+
shouldNotLogWithLocalLevelOverride('debug', logLevels.error);
|
|
256
|
+
shouldNotLogWithLocalLevelOverride('debug', logLevels.warn);
|
|
257
|
+
shouldNotLogWithLocalLevelOverride('debug', logLevels.info);
|
|
258
|
+
shouldLogWithLocalLevelOverride('debug', logLevels.debug);
|
|
259
|
+
shouldNotCallLogFunction(logLevels.error, logLevels.none);
|
|
260
|
+
shouldCallLogFunction(logLevels.error, logLevels.error);
|
|
261
|
+
shouldCallLogFunction(logLevels.error, logLevels.warn);
|
|
262
|
+
shouldCallLogFunction(logLevels.error, logLevels.info);
|
|
263
|
+
shouldCallLogFunction(logLevels.error, logLevels.debug);
|
|
264
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.none);
|
|
265
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.error);
|
|
266
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.warn);
|
|
267
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.info);
|
|
268
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.debug);
|
|
269
|
+
shouldNotCallLogFunction(logLevels.warn, logLevels.none);
|
|
270
|
+
shouldNotCallLogFunction(logLevels.warn, logLevels.error);
|
|
271
|
+
shouldCallLogFunction(logLevels.warn, logLevels.warn);
|
|
272
|
+
shouldCallLogFunction(logLevels.warn, logLevels.info);
|
|
273
|
+
shouldCallLogFunction(logLevels.warn, logLevels.debug);
|
|
274
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.none);
|
|
275
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.error);
|
|
276
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.warn);
|
|
277
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.info);
|
|
278
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.debug);
|
|
279
|
+
shouldNotCallLogFunction(logLevels.info, logLevels.none);
|
|
280
|
+
shouldNotCallLogFunction(logLevels.info, logLevels.error);
|
|
281
|
+
shouldNotCallLogFunction(logLevels.info, logLevels.warn);
|
|
282
|
+
shouldCallLogFunction(logLevels.info, logLevels.info);
|
|
283
|
+
shouldCallLogFunction(logLevels.info, logLevels.debug);
|
|
284
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.none);
|
|
285
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.error);
|
|
286
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.warn);
|
|
287
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.info);
|
|
288
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.debug);
|
|
289
|
+
shouldNotCallLogFunction(logLevels.debug, logLevels.none);
|
|
290
|
+
shouldNotCallLogFunction(logLevels.debug, logLevels.error);
|
|
291
|
+
shouldNotCallLogFunction(logLevels.debug, logLevels.warn);
|
|
292
|
+
shouldNotCallLogFunction(logLevels.debug, logLevels.info);
|
|
293
|
+
shouldCallLogFunction(logLevels.debug, logLevels.debug);
|
|
294
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.none);
|
|
295
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.error);
|
|
296
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.warn);
|
|
297
|
+
shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.info);
|
|
298
|
+
shouldCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.debug);
|
|
299
|
+
});
|
|
300
|
+
it('writes entry directly', () => {
|
|
301
|
+
const sl = createStandardLogForTest();
|
|
302
|
+
const log = sl.getLogger(['write-entry']);
|
|
303
|
+
const entry = { id: 'write-entry', level: logLevels.info, args: ['abc'], timestamp: new Date() };
|
|
304
|
+
log.write(entry);
|
|
305
|
+
a.satisfies(sl.reporter.logs, [entry]);
|
|
306
|
+
});
|
|
307
|
+
test.each(['on', 'count', 'error', 'warn', 'info', 'debug'])('method %s is readonly', name => {
|
|
308
|
+
const sl = createStandardLog();
|
|
309
|
+
const log = sl.getLogger([`${name} is readonly`]);
|
|
310
|
+
a.throws(() => log[name] = true);
|
|
311
|
+
});
|
|
312
|
+
describe('on()', () => {
|
|
313
|
+
it('log using log argument', () => {
|
|
314
|
+
const sl = createStandardLogForTest();
|
|
315
|
+
const logger = sl.getLogger(['log on fn']);
|
|
316
|
+
logger.on('error', log => { log('value'); });
|
|
317
|
+
a.satisfies(sl.reporter.logs, [
|
|
318
|
+
{ id: 'log on fn', level: logLevels.error, args: ['value'] }
|
|
319
|
+
]);
|
|
320
|
+
});
|
|
321
|
+
it('can take log level name in first argument', () => {
|
|
322
|
+
const sl = createStandardLogForTest();
|
|
323
|
+
const log = sl.getLogger(['string-on']);
|
|
324
|
+
log.on('debug', () => { return; });
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
describe('count()', () => {
|
|
328
|
+
test('will increment the counter', async () => {
|
|
329
|
+
const sl = createStandardLogForTest();
|
|
330
|
+
const logger = sl.getLogger(['inc counter']);
|
|
331
|
+
logger.count();
|
|
332
|
+
logger.count();
|
|
333
|
+
a.satisfies(sl.reporter.logs, [
|
|
334
|
+
{ id: 'inc counter', level: logLevels.debug, args: [1] },
|
|
335
|
+
{ id: 'inc counter', level: logLevels.debug, args: [2] }
|
|
336
|
+
]);
|
|
337
|
+
});
|
|
338
|
+
test('append args after the counter', async () => {
|
|
339
|
+
const sl = createStandardLogForTest(logLevels.debug);
|
|
340
|
+
const id = 'inc with args';
|
|
341
|
+
const logger = sl.getLogger([id]);
|
|
342
|
+
logger.count('msg1', 'msg2');
|
|
343
|
+
a.satisfies(sl.reporter.logs, [
|
|
344
|
+
{ id, level: logLevels.debug, args: [1, 'msg1', 'msg2'] }
|
|
345
|
+
]);
|
|
346
|
+
});
|
|
347
|
+
test('not log if log level is less than debug', async () => {
|
|
348
|
+
const sl = createStandardLogForTest(logLevels.debug - 1);
|
|
349
|
+
const id = 'inc with args';
|
|
350
|
+
const logger = sl.getLogger([id]);
|
|
351
|
+
logger.count('msg1', 'msg2');
|
|
352
|
+
expect(sl.reporter.logs.length).toBe(0);
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
test('logger with custom level', async () => {
|
|
356
|
+
const mem = createMemoryLogReporter();
|
|
357
|
+
const sl = createStandardLog({ customLevels: { 'cust_lvl': 100 }, reporters: [mem] });
|
|
358
|
+
const logger = sl.getLogger(['cust']);
|
|
359
|
+
logger.cust_lvl('a', 'b');
|
|
360
|
+
a.satisfies(mem.logs, [{ id: 'cust', level: 100, args: ['a', 'b'] }]);
|
|
361
|
+
});
|
|
362
|
+
describe('getLogger([,{ writeTo }])', () => {
|
|
363
|
+
function testWriteTo(loggerParams, handler) {
|
|
364
|
+
const memReporter = createMemoryLogReporter();
|
|
365
|
+
const specialReporter = createMemoryLogReporter({ id: 'special' });
|
|
366
|
+
const sl = createStandardLog({ reporters: [memReporter, specialReporter] });
|
|
367
|
+
const log = sl.getLogger(loggerParams);
|
|
368
|
+
handler(log, memReporter.logs, specialReporter.logs, sl);
|
|
369
|
+
}
|
|
370
|
+
it('can specify which reporter to use by name', () => {
|
|
371
|
+
testWriteTo(['writeTo-string', { writeTo: 'special' }], (log, memLogs, specialLogs) => {
|
|
372
|
+
log.error('error message');
|
|
373
|
+
expect(memLogs.length).toEqual(0);
|
|
374
|
+
expect(specialLogs.length).toEqual(1);
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
it('can specify which reporter to use by regex', () => {
|
|
378
|
+
testWriteTo(['writeTo-regex', { writeTo: /^spec/ }], (log, memLogs, specialLogs) => {
|
|
379
|
+
log.error('error message');
|
|
380
|
+
expect(memLogs.length).toEqual(0);
|
|
381
|
+
expect(specialLogs.length).toEqual(1);
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
it('can specify which reporter to use by RegExp', () => {
|
|
385
|
+
testWriteTo(['writeTo-RegExp', { writeTo: new RegExp('^spec') }], (log, memLogs, specialLogs) => {
|
|
386
|
+
log.error('error message');
|
|
387
|
+
expect(memLogs.length).toEqual(0);
|
|
388
|
+
expect(specialLogs.length).toEqual(1);
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
it('can specify which reporter to use by function', () => {
|
|
392
|
+
testWriteTo(['writeTo-fn', { writeTo: id => id === 'special' }], (log, memLogs, specialLogs) => {
|
|
393
|
+
log.error('error message');
|
|
394
|
+
expect(memLogs.length).toEqual(0);
|
|
395
|
+
expect(specialLogs.length).toEqual(1);
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
it('can specify custom reporter', () => {
|
|
399
|
+
const reporter = createMemoryLogReporter({ id: 'custom mem' });
|
|
400
|
+
testWriteTo(['writeTo-reporter', { writeTo: reporter }], (log, memLogs, specialLogs) => {
|
|
401
|
+
log.error('error message');
|
|
402
|
+
expect(memLogs.length).toEqual(0);
|
|
403
|
+
expect(specialLogs.length).toEqual(0);
|
|
404
|
+
expect(reporter.logs.length).toEqual(1);
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
test('the custom console reporter cannot pick up logs from other loggers', () => {
|
|
408
|
+
// if not, it would be a security issue as the new reporter
|
|
409
|
+
// can capture the logs from other logger and send it elsewhere
|
|
410
|
+
const reporter = createMemoryLogReporter({ id: 'custom mem' });
|
|
411
|
+
testWriteTo(['writeTo-reporter-no-override', { writeTo: reporter }], (_, memLogs, specialLogs, sl) => {
|
|
412
|
+
const log = sl.getLogger(['writeTo-reporter-no-override-2']);
|
|
413
|
+
log.error('error message');
|
|
414
|
+
expect(reporter.logs.length).toEqual(0);
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
});
|
|
419
|
+
describe('suppressLogs()', () => {
|
|
420
|
+
test('suppress log', () => {
|
|
421
|
+
const sl = createStandardLogForTest();
|
|
422
|
+
const log = sl.getLogger(['l']);
|
|
423
|
+
suppressLogs(() => {
|
|
424
|
+
log.alert('should not see me');
|
|
425
|
+
}, log);
|
|
426
|
+
expect(sl.reporter.getLogMessageWithLevel()).toBe('');
|
|
427
|
+
});
|
|
428
|
+
test('suppress multiple logs', () => {
|
|
429
|
+
const sl = createStandardLogForTest();
|
|
430
|
+
const log1 = sl.getLogger(['l1']);
|
|
431
|
+
const log2 = sl.getLogger(['l2']);
|
|
432
|
+
suppressLogs(() => {
|
|
433
|
+
log1.alert('should not see me');
|
|
434
|
+
log2.alert('should not see me too');
|
|
435
|
+
}, log1, log2);
|
|
436
|
+
expect(sl.reporter.getLogMessageWithLevel()).toBe('');
|
|
437
|
+
});
|
|
438
|
+
test('return block result', () => {
|
|
439
|
+
const sl = createStandardLogForTest();
|
|
440
|
+
const log1 = sl.getLogger(['l']);
|
|
441
|
+
const log2 = sl.getLogger(['l2']);
|
|
442
|
+
const a = suppressLogs(() => 1, log1, log2);
|
|
443
|
+
expect(a).toBe(1);
|
|
444
|
+
});
|
|
445
|
+
});
|
|
446
|
+
//# sourceMappingURL=standardLog.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standardLog.spec.js","sourceRoot":"","sources":["../ts/standardLog.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAe,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACzG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGnD,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAC5B,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAA;YAClC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;YACrB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAA;YAClC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAE,MAAc,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,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,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { assertron as a } from 'assertron'\nimport { InvalidId } from './errors.js'\nimport { logLevels, toLogLevelName } from './logLevels.js'\nimport { createMemoryLogReporter } from './memory.js'\nimport { createStandardLog, createStandardLogForTest, StandardLog, suppressLogs } from './standardLog.js'\nimport { assertSSF, wrapTest } from './testUtil.js'\nimport { LogEntry, Logger, LoggerOptions, LogMethodNames, StandardLogOptions } from './types.js'\n\ndescribe('createStandardLog()', () => {\n describe('logLevel', () => {\n it('is default to info', () => {\n const actual = createStandardLog()\n expect(actual.logLevel).toBe(logLevels.info)\n })\n it('is readonly', () => {\n const actual = createStandardLog()\n a.throws(() => (actual as any).logLevel = logLevels.planck, err => /only a getter/.test(err))\n })\n it('set logLevel from options', () => {\n const actual = createStandardLog({ logLevel: logLevels.planck })\n expect(actual.logLevel).toBe(logLevels.planck)\n })\n })\n\n describe('custom levels', () => {\n it('can define custom levels', () => {\n const actual = createStandardLog({ customLevels: { urgent: 80 } })\n\n expect(actual.toLogLevelName(80)).toBe('urgent')\n })\n })\n\n describe('reporters', () => {\n it('can specify reporter', () => {\n const mem = createMemoryLogReporter()\n const sl = createStandardLog({ reporters: [mem] })\n const log = sl.getLogger(['x'])\n log.info('abc')\n expect(mem.logs.length).toBe(1)\n })\n })\n})\n\ndescribe('createStandardLogForTest()', () => {\n it('returns with memory reporter', () => {\n const { reporter } = createStandardLogForTest()\n expect(reporter.getLogMessageWithLevel()).toBe('')\n })\n\n it('defaults to debug', () => {\n const store = createStandardLogForTest()\n expect(store.logLevel).toBe(logLevels.debug)\n })\n})\n\ndescribe('getLogger()', () => {\n it('supports id with alphanumeric and :_-.', () => {\n const sl = createStandardLog()\n sl.getLogger(['abcdefghijklmnopqrstuvwxyz:-_.1234567890'])\n })\n it('supports id with unicode', () => {\n const sl = createStandardLog()\n sl.getLogger(['ミク香港'])\n })\n it('supports id with @, \\\\ and /', () => {\n const sl = createStandardLog()\n sl.getLogger(['@unional/fixture'])\n sl.getLogger([`a\\\\b\\\\c`])\n })\n it.each('`~!#$%^&*()=+|[]{}<>,?'.split(''))('throws if id has unsupported character %s', (char: string) => {\n const sl = createStandardLog()\n a.throws(() => sl.getLogger([char]), InvalidId)\n })\n it('throw InvalidId with ssf to the call site', () => {\n const sl = createStandardLog()\n const err = a.throws(() => sl.getLogger(['!']), InvalidId)\n\n assertSSF(err, __filename)\n })\n test('id is readonly', () => {\n const sl = createStandardLog()\n const log: any = sl.getLogger(['id is readonly'])\n a.throws(() => log.id = 'b')\n })\n\n test('get logger with same name gets the same instance', () => {\n const sl = createStandardLog()\n const expected = sl.getLogger(['same-inst'])\n const actual = sl.getLogger(['same-inst'])\n expect(actual).toBe(expected)\n })\n\n it('can specify local log level', () => {\n const sl = createStandardLog()\n const log = sl.getLogger(['local', { level: logLevels.trace }])\n expect(log.level).toBe(logLevels.trace)\n })\n\n test('new logger will get custom level', () => {\n const sl = createStandardLog({ customLevels: { 'to_logger': 1234 } })\n const actual = sl.getLogger(['to_logger_logger'])\n expect(typeof actual.to_logger).toBe('function')\n })\n\n it('Logger have at least the default log method names', () => {\n function wrapper<N extends string = LogMethodNames>(options: Partial<StandardLogOptions<N>>) {\n const sl = createStandardLog<N>(options)\n // since `N` is generic, just `Logger<N>` will not have the default log method names.\n const log = sl.getLogger(['local'])\n expect(log.info).toBeDefined()\n return sl\n }\n\n const sl = wrapper({ customLevels: { 'cust': 123 } })\n const actual = sl.getLogger(['c'])\n expect(actual.cust).toBeDefined()\n })\n\n describe('log levels', () => {\n async function assertLoggedAtLevel(sl: ReturnType<typeof createStandardLogForTest>, method: LogMethodNames, level: number) {\n const log = sl.getLogger([method])\n const msg = `should log on level: ${level}`;\n (log as any)[method](msg)\n a.satisfies(sl.reporter.logs, [{ id: method, level: sl.toLogLevel(method), args: [msg] }])\n }\n\n async function assertNotLoggedAtLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, level: number) {\n const log = sl.getLogger([method]);\n (log as any)[method](`should not log on level: ${level}`)\n expect(sl.reporter.logs.length).toBe(0)\n }\n\n async function assertLoggedAtLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: LogMethodNames, localLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }])\n\n const msg = `should log on level: ${localLevel}`;\n (log as any)[method](msg)\n a.satisfies(sl.reporter.logs, [{ id: log.id, level: sl.toLogLevel(method), args: [msg] }])\n }\n\n async function assertNotLoggedAtLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, localLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }]);\n (log as any)[method](`should not log on level: ${localLevel}`)\n expect(sl.reporter.logs.length).toBe(0)\n }\n\n async function assertLoggedAtCallLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, callLevel: number) {\n const log = sl.getLogger([method])\n let actual = false\n log.on(callLevel, () => actual = true)\n expect(actual).toBe(true)\n }\n\n async function assertNotLoggedAtCallLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, callLevel: number, actualLevel: number) {\n const log = sl.getLogger([method])\n log.on(callLevel, () => { throw new Error(`should not log at level ${actualLevel}`) })\n }\n\n async function assertLoggedAtCallLevelOverrideLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, localLevel: number, callLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }])\n let actual = false\n log.on(callLevel, () => actual = true)\n expect(actual).toBe(true)\n }\n\n async function assertNotLoggedAtCallLevelOverrideLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, localLevel: number, callLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }])\n log.on(callLevel, () => { throw new Error(`should not log at level ${localLevel}`) })\n }\n\n const shouldLog = wrapTest((test) => (method: LogMethodNames, level: number) => {\n const sl = createStandardLogForTest(level)\n const name = sl.toLogLevelName(level)\n test(`${method}() should log on level: ${name} (${level})`, () => {\n return assertLoggedAtLevel(sl, method, level)\n })\n })\n const shouldNotLog = wrapTest((test) => (method: string, level: number) => {\n const sl = createStandardLogForTest(level)\n const name = sl.toLogLevelName(level)\n test(`${method}() should not log on level: ${name} (${level})`, () => {\n return assertNotLoggedAtLevel(sl, method, level)\n })\n })\n\n const shouldLogWithLocalLevelOverride = wrapTest((test) => (method: LogMethodNames, localLevel: number) => {\n const localName = toLogLevelName(localLevel);\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertLoggedAtLocalLevel(sl, method, localLevel)\n })\n })\n })\n\n const shouldNotLogWithLocalLevelOverride = wrapTest((test) => (method: string, localLevel: number) => {\n const localName = toLogLevelName(localLevel);\n\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should not log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertNotLoggedAtLocalLevel(sl, method, localLevel)\n })\n })\n })\n\n const shouldCallLogFunction = wrapTest((test) => (callLevel: number, actualLevel: number) => {\n const method = toLogLevelName(callLevel)\n const name = toLogLevelName(actualLevel)\n test(`${method}() should call log function on level: ${name} (${actualLevel})`, () => {\n const sl = createStandardLogForTest(actualLevel)\n return assertLoggedAtCallLevel(sl, method, callLevel)\n })\n })\n\n const shouldNotCallLogFunction = wrapTest((test) => (callLevel: number, actualLevel: number) => {\n const method = toLogLevelName(callLevel)\n const name = toLogLevelName(actualLevel)\n test(`${method}() should not call log function on level: ${name} (${actualLevel})`, () => {\n const sl = createStandardLogForTest(actualLevel)\n return assertNotLoggedAtCallLevel(sl, method, callLevel, actualLevel)\n })\n })\n\n const shouldCallLogFunctionWithLocalLevelOverride = wrapTest((test) => (callLevel: number, localLevel: number) => {\n const method = toLogLevelName(callLevel)\n const localName = toLogLevelName(localLevel);\n\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel)\n })\n })\n })\n\n const shouldNotCallLogFunctionWithLocalLevelOverride = wrapTest((test) => (callLevel: number, localLevel: number) => {\n const method = toLogLevelName(callLevel)\n const localName = toLogLevelName(localLevel);\n\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should not log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertNotLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel)\n })\n })\n })\n\n shouldNotLog('error', logLevels.none)\n shouldLog('error', logLevels.error)\n shouldLog('error', logLevels.warn)\n shouldLog('error', logLevels.info)\n shouldLog('error', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('error', logLevels.none)\n shouldLogWithLocalLevelOverride('error', logLevels.error)\n shouldLogWithLocalLevelOverride('error', logLevels.warn)\n shouldLogWithLocalLevelOverride('error', logLevels.info)\n shouldLogWithLocalLevelOverride('error', logLevels.debug)\n\n shouldNotLog('warn', logLevels.none)\n shouldNotLog('warn', logLevels.error)\n shouldLog('warn', logLevels.warn)\n shouldLog('warn', logLevels.info)\n shouldLog('warn', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('warn', logLevels.none)\n shouldNotLogWithLocalLevelOverride('warn', logLevels.error)\n shouldLogWithLocalLevelOverride('warn', logLevels.warn)\n shouldLogWithLocalLevelOverride('warn', logLevels.info)\n shouldLogWithLocalLevelOverride('warn', logLevels.debug)\n\n shouldNotLog('info', logLevels.none)\n shouldNotLog('info', logLevels.error)\n shouldNotLog('info', logLevels.warn)\n shouldLog('info', logLevels.info)\n shouldLog('info', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('info', logLevels.none)\n shouldNotLogWithLocalLevelOverride('info', logLevels.error)\n shouldNotLogWithLocalLevelOverride('info', logLevels.warn)\n shouldLogWithLocalLevelOverride('info', logLevels.info)\n shouldLogWithLocalLevelOverride('info', logLevels.debug)\n\n shouldNotLog('debug', logLevels.none)\n shouldNotLog('debug', logLevels.error)\n shouldNotLog('debug', logLevels.warn)\n shouldNotLog('debug', logLevels.info)\n shouldLog('debug', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.none)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.error)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.warn)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.info)\n shouldLogWithLocalLevelOverride('debug', logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.error, logLevels.none)\n shouldCallLogFunction(logLevels.error, logLevels.error)\n shouldCallLogFunction(logLevels.error, logLevels.warn)\n shouldCallLogFunction(logLevels.error, logLevels.info)\n shouldCallLogFunction(logLevels.error, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.none)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.error)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.warn)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.warn, logLevels.none)\n shouldNotCallLogFunction(logLevels.warn, logLevels.error)\n shouldCallLogFunction(logLevels.warn, logLevels.warn)\n shouldCallLogFunction(logLevels.warn, logLevels.info)\n shouldCallLogFunction(logLevels.warn, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.none)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.error)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.warn)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.info, logLevels.none)\n shouldNotCallLogFunction(logLevels.info, logLevels.error)\n shouldNotCallLogFunction(logLevels.info, logLevels.warn)\n shouldCallLogFunction(logLevels.info, logLevels.info)\n shouldCallLogFunction(logLevels.info, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.none)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.error)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.warn)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.debug, logLevels.none)\n shouldNotCallLogFunction(logLevels.debug, logLevels.error)\n shouldNotCallLogFunction(logLevels.debug, logLevels.warn)\n shouldNotCallLogFunction(logLevels.debug, logLevels.info)\n shouldCallLogFunction(logLevels.debug, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.none)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.error)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.warn)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.debug)\n })\n\n it('writes entry directly', () => {\n const sl = createStandardLogForTest()\n const log = sl.getLogger(['write-entry'])\n const entry = { id: 'write-entry', level: logLevels.info, args: ['abc'], timestamp: new Date() }\n log.write(entry)\n a.satisfies(sl.reporter.logs, [entry])\n })\n test.each(['on', 'count', 'error', 'warn', 'info', 'debug'])('method %s is readonly', name => {\n const sl = createStandardLog()\n const log: any = sl.getLogger([`${name} is readonly`])\n\n a.throws(() => log[name] = true)\n })\n\n\n describe('on()', () => {\n it('log using log argument', () => {\n const sl = createStandardLogForTest()\n const logger = sl.getLogger(['log on fn'])\n logger.on('error', log => { log('value') })\n\n a.satisfies(sl.reporter.logs, [\n { id: 'log on fn', level: logLevels.error, args: ['value'] }\n ])\n })\n it('can take log level name in first argument', () => {\n const sl = createStandardLogForTest()\n const log = sl.getLogger(['string-on'])\n log.on('debug', () => { return })\n })\n })\n describe('count()', () => {\n test('will increment the counter', async () => {\n const sl = createStandardLogForTest()\n const logger = sl.getLogger(['inc counter'])\n\n logger.count()\n logger.count()\n\n a.satisfies(sl.reporter.logs, [\n { id: 'inc counter', level: logLevels.debug, args: [1] },\n { id: 'inc counter', level: logLevels.debug, args: [2] }\n ])\n })\n\n test('append args after the counter', async () => {\n const sl = createStandardLogForTest(logLevels.debug)\n const id = 'inc with args'\n const logger = sl.getLogger([id])\n logger.count('msg1', 'msg2')\n\n a.satisfies(sl.reporter.logs, [\n { id, level: logLevels.debug, args: [1, 'msg1', 'msg2'] }\n ])\n })\n\n test('not log if log level is less than debug', async () => {\n const sl = createStandardLogForTest(logLevels.debug - 1)\n const id = 'inc with args'\n const logger = sl.getLogger([id])\n logger.count('msg1', 'msg2')\n\n expect(sl.reporter.logs.length).toBe(0)\n })\n })\n\n test('logger with custom level', async () => {\n const mem = createMemoryLogReporter()\n const sl = createStandardLog({ customLevels: { 'cust_lvl': 100 }, reporters: [mem] })\n const logger = sl.getLogger(['cust'])\n logger.cust_lvl('a', 'b')\n\n a.satisfies(mem.logs, [{ id: 'cust', level: 100, args: ['a', 'b'] }])\n })\n\n describe('getLogger([,{ writeTo }])', () => {\n function testWriteTo(\n loggerParams: [id: string, options: LoggerOptions],\n handler: (log: Logger, memLogs: LogEntry[], specialLogs: LogEntry[], sl: StandardLog) => void\n ) {\n const memReporter = createMemoryLogReporter()\n const specialReporter = createMemoryLogReporter({ id: 'special' })\n const sl = createStandardLog({ reporters: [memReporter, specialReporter] })\n\n const log = sl.getLogger(loggerParams)\n handler(log, memReporter.logs, specialReporter.logs, sl)\n }\n it('can specify which reporter to use by name', () => {\n testWriteTo(['writeTo-string', { writeTo: 'special' }], (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify which reporter to use by regex', () => {\n testWriteTo(['writeTo-regex', { writeTo: /^spec/ }], (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify which reporter to use by RegExp', () => {\n testWriteTo(['writeTo-RegExp', { writeTo: new RegExp('^spec') }], (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify which reporter to use by function', () => {\n testWriteTo(['writeTo-fn', { writeTo: id => id === 'special' }],\n (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify custom reporter', () => {\n const reporter = createMemoryLogReporter({ id: 'custom mem' })\n testWriteTo(['writeTo-reporter', { writeTo: reporter }],\n (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(0)\n expect(reporter.logs.length).toEqual(1)\n })\n })\n\n test('the custom console reporter cannot pick up logs from other loggers', () => {\n // if not, it would be a security issue as the new reporter\n // can capture the logs from other logger and send it elsewhere\n const reporter = createMemoryLogReporter({ id: 'custom mem' })\n testWriteTo(['writeTo-reporter-no-override', { writeTo: reporter }],\n (_, memLogs, specialLogs, sl) => {\n const log = sl.getLogger(['writeTo-reporter-no-override-2'])\n log.error('error message')\n\n expect(reporter.logs.length).toEqual(0)\n })\n })\n })\n})\n\ndescribe('suppressLogs()', () => {\n test('suppress log', () => {\n const sl = createStandardLogForTest()\n const log = sl.getLogger(['l'])\n suppressLogs(() => {\n log.alert('should not see me')\n }, log)\n\n expect(sl.reporter.getLogMessageWithLevel()).toBe('')\n })\n\n test('suppress multiple logs', () => {\n const sl = createStandardLogForTest()\n const log1 = sl.getLogger(['l1'])\n const log2 = sl.getLogger(['l2'])\n suppressLogs(() => {\n log1.alert('should not see me')\n log2.alert('should not see me too')\n }, log1, log2)\n expect(sl.reporter.getLogMessageWithLevel()).toBe('')\n })\n\n test('return block result', () => {\n const sl = createStandardLogForTest()\n const log1 = sl.getLogger(['l'])\n const log2 = sl.getLogger(['l2'])\n const a = suppressLogs(() => 1, log1, log2)\n expect(a).toBe(1)\n })\n})\n"]}
|
package/esm/testUtil.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import type { LogEntry } from './types.js';
|
|
2
3
|
export declare function rangeEntries(start: number, end: number, expected: any): any[][];
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export declare function assertSSF(err: Error, filename: string): void;
|
|
5
|
+
export declare function logEntriesToString(logs: LogEntry[]): string;
|
|
6
|
+
export declare function wrapTest<F>(fn: (test: jest.It) => F): F & {
|
|
7
|
+
only: F;
|
|
8
|
+
skip: F;
|
|
6
9
|
};
|
|
7
10
|
//# sourceMappingURL=testUtil.d.ts.map
|
package/esm/testUtil.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtil.d.ts","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testUtil.d.ts","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,WAErE;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAGrD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAElD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC;;;EAEnD"}
|
package/esm/testUtil.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import R from 'ramda';
|
|
2
|
-
import {
|
|
2
|
+
import { plainLogFormatter } from './formatter.js';
|
|
3
|
+
import { toInspectLogEntry } from './platform.js';
|
|
3
4
|
export function rangeEntries(start, end, expected) {
|
|
4
5
|
return R.range(start, end).map(value => ([value, expected]));
|
|
5
6
|
}
|
|
6
|
-
export function
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
7
|
+
export function assertSSF(err, filename) {
|
|
8
|
+
const firstStackTrace = err.stack?.split('\n')[1];
|
|
9
|
+
expect(firstStackTrace).toMatch(filename);
|
|
10
|
+
}
|
|
11
|
+
export function logEntriesToString(logs) {
|
|
12
|
+
return logs.map(toInspectLogEntry).map(plainLogFormatter).join('\n');
|
|
13
|
+
}
|
|
14
|
+
export function wrapTest(fn) {
|
|
15
|
+
return Object.assign(fn(test), { only: fn(test.only), skip: fn(test.skip) });
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=testUtil.js.map
|
package/esm/testUtil.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtil.js","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"testUtil.js","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,OAAO,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAGjD,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,GAAW,EAAE,QAAa;IACpE,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;AAC9D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAU,EAAE,QAAgB;IACpD,MAAM,eAAe,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IACjD,MAAM,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACtE,CAAC;AAED,MAAM,UAAU,QAAQ,CAAI,EAAwB;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC9E,CAAC","sourcesContent":["import R from 'ramda'\nimport { plainLogFormatter } from './formatter.js'\nimport { toInspectLogEntry } from './platform.js'\nimport type { LogEntry } from './types.js'\n\nexport function rangeEntries(start: number, end: number, expected: any) {\n return R.range(start, end).map(value => ([value, expected]))\n}\n\nexport function assertSSF(err: Error, filename: string) {\n const firstStackTrace = err.stack?.split('\\n')[1]\n expect(firstStackTrace).toMatch(filename)\n}\n\nexport function logEntriesToString(logs: LogEntry[]) {\n return logs.map(toInspectLogEntry).map(plainLogFormatter).join('\\n')\n}\n\nexport function wrapTest<F>(fn: (test: jest.It) => F) {\n return Object.assign(fn(test), { only: fn(test.only), skip: fn(test.skip) })\n}\n"]}
|