Skip to content

Commit 1c1b9d2

Browse files
committed
chore: update unit tests
1 parent 3397584 commit 1c1b9d2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

internal/functions/deploy/upload_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/spf13/afero"
1717
"github.com/stretchr/testify/assert"
1818
"github.com/stretchr/testify/mock"
19+
"github.com/stretchr/testify/require"
1920
"github.com/supabase/cli/internal/testing/apitest"
2021
"github.com/supabase/cli/internal/utils"
2122
"github.com/supabase/cli/internal/utils/flags"
@@ -90,7 +91,7 @@ func TestWriteForm(t *testing.T) {
9091
t.Run("writes import map", func(t *testing.T) {
9192
var buf bytes.Buffer
9293
form := multipart.NewWriter(&buf)
93-
form.SetBoundary("test")
94+
require.NoError(t, form.SetBoundary("test"))
9495
// Setup in-memory fs
9596
fsys := afero.FromIOFS{FS: testImports}
9697
// Run test
@@ -99,10 +100,7 @@ func TestWriteForm(t *testing.T) {
99100
VerifyJwt: cast.Ptr(true),
100101
EntrypointPath: "testdata/nested/index.ts",
101102
ImportMapPath: cast.Ptr("testdata/nested/deno.json"),
102-
StaticPatterns: cast.Ptr([]string{
103-
"testdata/*/*.js",
104-
"testdata/shared",
105-
}),
103+
StaticPatterns: cast.Ptr([]string{"testdata/*/*.js"}),
106104
}, fsys)
107105
// Check error
108106
assert.NoError(t, err)
@@ -112,7 +110,7 @@ func TestWriteForm(t *testing.T) {
112110
t.Run("throws error on missing file", func(t *testing.T) {
113111
var buf bytes.Buffer
114112
form := multipart.NewWriter(&buf)
115-
form.SetBoundary("test")
113+
require.NoError(t, form.SetBoundary("test"))
116114
// Setup in-memory fs
117115
fsys := afero.NewMemMapFs()
118116
// Run test

0 commit comments

Comments
 (0)