summaryrefslogtreecommitdiff
path: root/js/js_test.go
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-10 18:18:01 +0200
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-10 18:18:01 +0200
commit7e4cf39a0ba6ccbd5cc036700a8b1ff9358ecc3d (patch)
tree0f48b46e70162bad117f9f50d297487dee33266f /js/js_test.go
parenta9b61f84070cc7ca0d6e26f187c745619a91422a (diff)
improve
Diffstat (limited to 'js/js_test.go')
-rw-r--r--js/js_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/js_test.go b/js/js_test.go
index 877ac8b..f25c95b 100644
--- a/js/js_test.go
+++ b/js/js_test.go
@@ -5,6 +5,7 @@ import (
"net/http"
"testing"
+ "flyscrape/flyscrape"
"flyscrape/js"
"github.com/stretchr/testify/require"
@@ -13,12 +14,15 @@ import (
func TestV8(t *testing.T) {
opts, run, err := js.Compile("../examples/esbuild.github.io.js")
require.NoError(t, err)
+ require.NotNil(t, opts)
+ require.NotNil(t, run)
html := fetch(opts.URL)
- json := run(js.RunOptions{
+ json, err := run(flyscrape.ScrapeParams{
HTML: html,
})
+ require.NoError(t, err)
t.Log(json)
}