Skip to content

Commit

Permalink
chore: use deno.json
Browse files Browse the repository at this point in the history
  • Loading branch information
avallete committed Dec 20, 2024
1 parent fa71356 commit 2d91df9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/utils/deno_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestResolveImports(t *testing.T) {
fsys := afero.NewMemMapFs()
cwd, err := os.Getwd()
require.NoError(t, err)
jsonPath := filepath.Join(cwd, filepath.Join(FunctionsDir, "import_map.json"))
jsonPath := filepath.Join(cwd, filepath.Join(FunctionsDir, "deno.json"))
require.NoError(t, afero.WriteFile(fsys, jsonPath, importMap, 0644))
require.NoError(t, fsys.Mkdir(filepath.Join(cwd, "common"), 0755))
require.NoError(t, fsys.Mkdir(filepath.Join(cwd, DbTestsDir), 0755))
Expand All @@ -51,9 +51,9 @@ func TestResolveImports(t *testing.T) {
}`)
// Setup in-memory fs
fsys := afero.NewMemMapFs()
require.NoError(t, afero.WriteFile(fsys, filepath.Join(FunctionsDir, "import_map.json"), importMap, 0644))
require.NoError(t, afero.WriteFile(fsys, filepath.Join(FunctionsDir, "deno.json"), importMap, 0644))
// Run test
resolved, err := NewImportMap(filepath.Join(FunctionsDir, "import_map.json"), fsys)
resolved, err := NewImportMap(filepath.Join(FunctionsDir, "deno.json"), fsys)
// Check error
assert.NoError(t, err)
assert.Equal(t, "https://deno.land", resolved.Scopes["my-scope"]["my-mod"])
Expand Down

0 comments on commit 2d91df9

Please sign in to comment.