Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong committed Nov 12, 2023
1 parent f0f1dfb commit 7c48f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func BenchmarkWatch(b *testing.B) {
b.StopTimer()

var cfg string
config.OnChange(func(unmarshaler konf.Unmarshaler) {
assert.NoError(b, config.Unmarshal("config", &cfg))
konf.OnChange(func() {
assert.NoError(b, konf.Unmarshal("config", &cfg))
})
watcher.change(map[string]any{"config": "changed"})
assert.Equal(b, "changed", cfg)
Expand Down
4 changes: 2 additions & 2 deletions global_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func TestWatch(t *testing.T) {
}()

var cfg string
config.OnChange(func(unmarshaler konf.Unmarshaler) {
assert.NoError(t, config.Unmarshal("config", &cfg))
konf.OnChange(func() {
assert.NoError(t, konf.Unmarshal("config", &cfg))
})
watcher.change(map[string]any{"config": "changed"})
assert.Equal(t, "changed", cfg)
Expand Down

0 comments on commit 7c48f92

Please sign in to comment.