MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestDetectProject_React

Function TestDetectProject_React

internal/cli/quickstart_detect_test.go:96–106  ·  view source on GitHub ↗

-- DetectProject - SPA --. Auth0 qs setup --app --type spa --framework react --build-tool vite.

(t *testing.T)

Source from the content-addressed store, hash-verified

94
95// Auth0 qs setup --app --type spa --framework react --build-tool vite.
96func TestDetectProject_React(t *testing.T) {
97 dir := t.TempDir()
98 writeTestFile(t, dir, "vite.config.ts", "")
99 writeTestFile(t, dir, "package.json", `{"name":"my-react-app","dependencies":{"react":"^18"}}`)
100
101 got := DetectProject(dir)
102 assert.True(t, got.Detected)
103 assert.Equal(t, "react", got.Framework)
104 assert.Equal(t, "spa", got.Type)
105 assert.Equal(t, "vite", got.BuildTool)
106}
107
108// Auth0 qs setup --app --type spa --framework angular.
109func TestDetectProject_Angular(t *testing.T) {

Callers

nothing calls this directly

Calls 2

writeTestFileFunction · 0.85
DetectProjectFunction · 0.85

Tested by

no test coverage detected