Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez committed Sep 12, 2024
1 parent 66e46d0 commit 2d8777a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@ func TestNewBundle(t *testing.T) {
`)
require.NoError(t, err)
})
t.Run("Null", func(t *testing.T) {
t.Parallel()
fs := fsext.NewMemMapFs()
require.NoError(t, fsext.WriteFile(fs, "/options.js", []byte("module.exports={}"), 0o644))
_, err := getSimpleBundle(t, "/script.js", `
export {options} from "./options.js";
export default function() {};
`, fs)
require.NoError(t, err)
})
t.Run("Invalid", func(t *testing.T) {
t.Parallel()
invalidOptions := map[string]struct {
Expand Down

0 comments on commit 2d8777a

Please sign in to comment.