mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
This commit is contained in:
@@ -431,6 +431,8 @@ func TestExists(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAbsPathify(t *testing.T) {
|
||||
defer viper.Reset()
|
||||
|
||||
type test struct {
|
||||
inPath, workingDir, expected string
|
||||
}
|
||||
@@ -450,6 +452,7 @@ func TestAbsPathify(t *testing.T) {
|
||||
}
|
||||
|
||||
for i, d := range data {
|
||||
viper.Reset()
|
||||
// todo see comment in AbsPathify
|
||||
viper.Set("WorkingDir", d.workingDir)
|
||||
|
||||
|
Reference in New Issue
Block a user