MCPcopy Create free account
hub / github.com/Effect-TS/effect / runIgnore

Function runIgnore

packages/effect/test/Stream.test.ts:986–998  ·  view source on GitHub ↗
(options?: IgnoreOptions, currentLogLevel: LogLevel.Severity = "Info")

Source from the content-addressed store, hash-verified

984 }
985
986 const runIgnore = (options?: IgnoreOptions, currentLogLevel: LogLevel.Severity = "Info") =>
987 Effect.gen(function*() {
988 const { capturedLogs, testLogger } = makeTestLogger()
989 const program = options === undefined
990 ? Stream.fail("boom").pipe(Stream.ignore, Stream.runDrain)
991 : Stream.fail("boom").pipe(Stream.ignore(options), Stream.runDrain)
992 yield* program.pipe(
993 Effect.provide(Logger.layer([testLogger])),
994 Effect.provideService(References.MinimumLogLevel, "Trace"),
995 Effect.provideService(References.CurrentLogLevel, currentLogLevel)
996 )
997 return capturedLogs
998 })
999
1000 it.effect("does not log when log is omitted", () =>
1001 Effect.gen(function*() {

Callers 1

Stream.test.tsFile · 0.70

Calls 4

makeTestLoggerFunction · 0.70
pipeMethod · 0.65
failMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected