(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestMissingExerciseConfig(t *testing.T) { |
| 66 | dir, err := os.MkdirTemp("", "exercise_config") |
| 67 | assert.NoError(t, err) |
| 68 | defer os.RemoveAll(dir) |
| 69 | |
| 70 | _, err = NewExerciseConfig(dir) |
| 71 | assert.Error(t, err) |
| 72 | // any assertions about this error message have to work across all platforms, so be vague |
| 73 | // unix: ".exercism/config.json: no such file or directory" |
| 74 | // windows: "open .exercism\config.json: The system cannot find the path specified." |
| 75 | assert.Contains(t, err.Error(), filepath.Join(".exercism", "config.json:")) |
| 76 | } |
| 77 | |
| 78 | func TestInvalidExerciseConfig(t *testing.T) { |
| 79 | dir, err := os.MkdirTemp("", "exercise_config") |
nothing calls this directly
no test coverage detected