- Replace all testify/assert and testify/require with be library - Update go.mod to use be v0.3.0 instead of testify - Simplify test assertions using be.Equal, be.Err, and be.True - Refactor append_test, entry_test, meta_test, log_test, and formatter tests
17 lines
277 B
Go
17 lines
277 B
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
fp "path/filepath"
|
|
"testing"
|
|
|
|
"github.com/nalgeon/be"
|
|
)
|
|
|
|
func TestDefaultConfig(t *testing.T) {
|
|
home, _ := os.UserHomeDir()
|
|
inDir := fp.Join(home, "my-log")
|
|
c, err := DefaultConfig()
|
|
be.Err(t, err, nil)
|
|
be.Equal(t, c.Input.Path, inDir)
|
|
}
|