summaryrefslogtreecommitdiff
path: root/js_test.go
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-12-04 18:30:19 +0100
committerGitHub <noreply@github.com>2023-12-04 18:30:19 +0100
commit0f9e334a19e7224ee08b611107029b4cd86c0267 (patch)
tree9740c7edc47f8e81d6a1352c94160d584bfb9f26 /js_test.go
parent8c68e0ed414bfb323d6e94db55c95db13797ef8e (diff)
Support file imports for .txt and .json (#25)v0.6.0
Diffstat (limited to 'js_test.go')
-rw-r--r--js_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/js_test.go b/js_test.go
index c684319..0aeb9cd 100644
--- a/js_test.go
+++ b/js_test.go
@@ -216,8 +216,8 @@ func TestJSConfig(t *testing.T) {
func TestJSImports(t *testing.T) {
js := `
- import A from "pkg-a"
- import { bar } from "pkg-a/pkg-b"
+ import A from "flyscrape"
+ import { bar } from "flyscrape/foo"
export const config = {}
export default function() {}
@@ -226,10 +226,10 @@ func TestJSImports(t *testing.T) {
export const b = bar()
`
imports := flyscrape.Imports{
- "pkg-a": map[string]any{
+ "flyscrape": map[string]any{
"foo": 10,
},
- "pkg-a/pkg-b": map[string]any{
+ "flyscrape/foo": map[string]any{
"bar": func() string {
return "baz"
},