Skip to content

Commit

Permalink
chore: additional js test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Musat authored and gabotechs committed Dec 24, 2022
1 parent 69364d3 commit d5f0f7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/js/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ func TestParser_Deps(t *testing.T) {
"parser_test/with-imports-index-imported/index.js",
},
},
{
Name: "with-imports-nested",
Normalize: true,
Expected: []string{
"parser_test/with-imports-nested/generated/generated.js",
},
},

{
Name: "custom-1",
Expand All @@ -76,6 +83,9 @@ func TestParser_Deps(t *testing.T) {
t.Run(tt.Name, func(t *testing.T) {
a := require.New(t)
id := path.Join(testFolder, path.Base(t.Name())+".js")
if _, err := os.Stat(id); err != nil {
id = path.Join(testFolder, path.Base(t.Name()), "index.js")
}

node, err := Parser.Parse(id)
a.NoError(err)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("hello world!")
1 change: 1 addition & 0 deletions internal/js/parser_test/with-imports-nested/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './generated/generated'

0 comments on commit d5f0f7a

Please sign in to comment.