MCPcopy Create free account
hub / github.com/exercism/cli / TestNewFromDir

Function TestNewFromDir

workspace/exercise_test.go:61–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestNewFromDir(t *testing.T) {
62 dir := filepath.Join("something", "another", "whatever", "the-track", "the-exercise")
63
64 exercise := NewExerciseFromDir(dir)
65 assert.Equal(t, filepath.Join("something", "another", "whatever"), exercise.Root)
66 assert.Equal(t, "the-track", exercise.Track)
67 assert.Equal(t, "the-exercise", exercise.Slug)
68}
69
70func TestMigrationStatusString(t *testing.T) {
71 assert.Equal(t, "\nMigrated metadata\n", MigrationStatusMigrated.String())

Callers

nothing calls this directly

Calls 1

NewExerciseFromDirFunction · 0.85

Tested by

no test coverage detected