DoEffectErrorBaseline generates an error baseline for Effect tests. This writes to our testdata directory instead of typescript-go's.
( t *testing.T, baselineName string, allFiles []*harnessutil.TestFile, diagnostics []*ast.Diagnostic, _ bool, subfolder string, effectVersion string, )
| 41 | // DoEffectErrorBaseline generates an error baseline for Effect tests. |
| 42 | // This writes to our testdata directory instead of typescript-go's. |
| 43 | func DoEffectErrorBaseline( |
| 44 | t *testing.T, |
| 45 | baselineName string, |
| 46 | allFiles []*harnessutil.TestFile, |
| 47 | diagnostics []*ast.Diagnostic, |
| 48 | _ bool, |
| 49 | subfolder string, |
| 50 | effectVersion string, |
| 51 | ) { |
| 52 | // Generate the baseline content |
| 53 | baselineContent := generateErrorBaseline(effectVersion, allFiles, diagnostics) |
| 54 | |
| 55 | // Run baseline comparison |
| 56 | runEffectBaseline(t, baselineName+".errors.txt", baselineContent, subfolder) |
| 57 | } |
| 58 | |
| 59 | // nonWhitespace matches non-whitespace characters for preserving indentation in squiggles. |
| 60 | var nonWhitespace = regexp.MustCompile(`\S`) |
no test coverage detected