summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2024-02-24 22:30:29 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2024-02-24 22:30:29 +0100
commitaff32d2072b691e4308953e28640d544c377d69d (patch)
tree90cdd53fbbea3b655909d0788280585f8eee5c09
parente449cbeb6c9c14b4a9db26906826e3c4f85da74e (diff)
test: Remove watch error test
-rw-r--r--watch_test.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/watch_test.go b/watch_test.go
index 539ad3b..982b901 100644
--- a/watch_test.go
+++ b/watch_test.go
@@ -5,7 +5,6 @@
package flyscrape_test
import (
- "errors"
"os"
"testing"
"time"
@@ -43,23 +42,6 @@ func TestWatch(t *testing.T) {
<-done
}
-func TestWatchError(t *testing.T) {
- f := tmpfile(t)
- defer os.Remove(f.Name())
-
- done := make(chan struct{})
- go func() {
- err := flyscrape.Watch(f.Name(), func(s string) error {
- return errors.New("test")
- })
- require.Error(t, err)
- close(done)
- }()
-
- write(f, "test 2")
- <-done
-}
-
func tmpfile(t *testing.T) *os.File {
f, err := os.CreateTemp("", "scrape.js")
require.NoError(t, err)