Documentation
¶
Index ¶
- func CompileGoToTypeScript(t *testing.T, testDir, tempDir, outputDir string, le *logrus.Entry)
- func PrepareTempTestDir(t *testing.T, testDir string) string
- func ReadExpectedLog(t *testing.T, testDir string) string
- func RunGoScriptTestDir(t *testing.T, workspaceDir, testDir string)
- func RunTypeScriptRunner(t *testing.T, workspaceDir, tempDir, tsRunner string) string
- func RunTypeScriptTypeCheck(t *testing.T, workspaceDir, testDir string, tsconfigPath string)
- func WriteTypeCheckConfig(t *testing.T, workspaceDir, testDir string) string
- func WriteTypeScriptRunner(t *testing.T, testDir, tempDir string) string
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileGoToTypeScript ¶
func PrepareTempTestDir ¶
PrepareTempTestDir creates a temp dir, copies .go files, and writes go.mod. Returns tempDir path.
func ReadExpectedLog ¶
ReadExpectedLog reads expected.log from testDir.
func RunGoScriptTestDir ¶
RunGoScriptTestDir compiles all .go files in testDir, runs the generated TypeScript, and compares output to expected.log.
func RunTypeScriptRunner ¶
RunTypeScriptRunner runs the runner.ts file using tsx and returns its stdout.
func RunTypeScriptTypeCheck ¶ added in v0.0.16
RunTypeScriptTypeCheck runs tsc --project tsconfig.json to typecheck the generated .gs.ts files.
func WriteTypeCheckConfig ¶ added in v0.0.16
WriteTypeCheckConfig writes a tsconfig.json file in the test directory that extends the root tsconfig.json
Types ¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.