MCPcopy
hub / github.com/uber-go/zap / TestOpenNoPaths

Function TestOpenNoPaths

writer_test.go:38–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36)
37
38func TestOpenNoPaths(t *testing.T) {
39 ws, cleanup, err := Open()
40 defer cleanup()
41
42 assert.NoError(t, err, "Expected opening no paths to succeed.")
43 assert.Equal(
44 t,
45 zapcore.AddSync(io.Discard),
46 ws,
47 "Expected opening no paths to return a no-op WriteSyncer.",
48 )
49}
50
51func TestOpen(t *testing.T) {
52 tempName := filepath.Join(t.TempDir(), "test.log")

Callers

nothing calls this directly

Calls 2

AddSyncFunction · 0.92
OpenFunction · 0.85

Tested by

no test coverage detected