(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func TestGetLockFilePath(t *testing.T) { |
| 16 | tests := []struct { |
| 17 | name string |
| 18 | markdownPath string |
| 19 | expected string |
| 20 | }{ |
| 21 | { |
| 22 | name: "regular workflow", |
| 23 | markdownPath: "/path/to/workflow.md", |
| 24 | expected: "/path/to/workflow.lock.yml", |
| 25 | }, |
| 26 | { |
| 27 | name: "workflow in nested directory", |
| 28 | markdownPath: "/path/to/workflows/nested/workflow.md", |
| 29 | expected: "/path/to/workflows/nested/workflow.lock.yml", |
| 30 | }, |
| 31 | } |
| 32 | |
| 33 | for _, tt := range tests { |
| 34 | t.Run(tt.name, func(t *testing.T) { |
| 35 | result := getLockFilePath(tt.markdownPath) |
| 36 | assert.Equal(t, tt.expected, result) |
| 37 | }) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func TestIsRunnable_WithLockFile(t *testing.T) { |
| 42 | tests := []struct { |
nothing calls this directly
no test coverage detected