diff --git a/file_watcher_test.go b/file_watcher_test.go index 2749738..241a5bd 100644 --- a/file_watcher_test.go +++ b/file_watcher_test.go @@ -94,7 +94,7 @@ func TestFileWatcher_CurrentDir(t *testing.T) { // nolint:paralleltest require := require.New(t) assert := assert.New(t) tmpdir := t.TempDir() - require.NoError(os.Chdir(tmpdir)) + t.Chdir(tmpdir) filename := path.Join(tmpdir, "test.txt") require.NoError(os.WriteFile(filename, []byte("Hello world!"), 0644))