From 0f9e334a19e7224ee08b611107029b4cd86c0267 Mon Sep 17 00:00:00 2001 From: Philipp Tanlak Date: Mon, 4 Dec 2023 18:30:19 +0100 Subject: Support file imports for .txt and .json (#25) --- js_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js_test.go') 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" }, -- cgit v1.2.3