MCPcopy Create free account
hub / github.com/microsoft/typescript-go / executeCommand

Method executeCommand

internal/execute/tsctests/runner.go:44–64  ·  view source on GitHub ↗
(sys *TestSys, baselineBuilder *strings.Builder, commandLineArgs []string)

Source from the content-addressed store, hash-verified

42}
43
44func (test *tscInput) executeCommand(sys *TestSys, baselineBuilder *strings.Builder, commandLineArgs []string) tsc.CommandLineResult {
45 fmt.Fprint(baselineBuilder, "tsgo ", strings.Join(commandLineArgs, " "), "\n")
46 result := execute.CommandLine(context.Background(), sys, commandLineArgs, sys)
47 switch result.Status {
48 case tsc.ExitStatusSuccess:
49 baselineBuilder.WriteString("ExitStatus:: Success")
50 case tsc.ExitStatusDiagnosticsPresent_OutputsSkipped:
51 baselineBuilder.WriteString("ExitStatus:: DiagnosticsPresent_OutputsSkipped")
52 case tsc.ExitStatusDiagnosticsPresent_OutputsGenerated:
53 baselineBuilder.WriteString("ExitStatus:: DiagnosticsPresent_OutputsGenerated")
54 case tsc.ExitStatusInvalidProject_OutputsSkipped:
55 baselineBuilder.WriteString("ExitStatus:: InvalidProject_OutputsSkipped")
56 case tsc.ExitStatusProjectReferenceCycle_OutputsSkipped:
57 baselineBuilder.WriteString("ExitStatus:: ProjectReferenceCycle_OutputsSkipped")
58 case tsc.ExitStatusNotImplemented:
59 baselineBuilder.WriteString("ExitStatus:: NotImplemented")
60 default:
61 panic(fmt.Sprintf("UnknownExitStatus %d", result.Status))
62 }
63 return result
64}
65
66func (test *tscInput) run(t *testing.T, scenario string) {
67 t.Helper()

Callers 12

runMethod · 0.95
updateContextMethod · 0.80
showCodeLensLocationsFunction · 0.80
activateFunction · 0.80
startMethod · 0.80
registerCommandsMethod · 0.80
disposeMethod · 0.80
showCommandsFunction · 0.80
promptSelectVersionFunction · 0.80

Calls 2

CommandLineFunction · 0.92
panicFunction · 0.85

Tested by

no test coverage detected