(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func TestGetModulesByName(t *testing.T) { |
| 27 | reg := testRegistry() |
| 28 | t.Run("should return modules of specified stack", func(t *testing.T) { |
| 29 | |
| 30 | assert.Equal(t, registry.GetModulesByName(reg, "EKS + Go + React + Gatsby"), |
| 31 | []string{"module-source 1", "module-source 2"}) |
| 32 | assert.Equal(t, registry.GetModulesByName(reg, "lorem"), []string{"module-source 5"}) |
| 33 | assert.Equal(t, registry.GetModulesByName(reg, "ipsum"), []string{"module-source 6"}) |
| 34 | assert.Equal(t, registry.GetModulesByName(reg, "Custom"), []string{"module-source 7"}) |
| 35 | }) |
| 36 | } |
| 37 | |
| 38 | func testRegistry() registry.Registry { |
| 39 | return registry.Registry{ |
nothing calls this directly
no test coverage detected