Skip to content

Commit

Permalink
chore: add unit tests (#1763)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Jul 29, 2024
1 parent a331548 commit 1f6bf6f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions pkg/loaders/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ func Test_defaultLoader(t *testing.T) {
})
}
}

func TestDefaultLoader(t *testing.T) {
data, err := DefaultLoader()
assert.NoError(t, err)
assert.NotNil(t, data)
}
4 changes: 2 additions & 2 deletions pkg/loaders/steptemplate/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestLoad(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := Load(tt.path, false)
got, err := Load(tt.path, true)
if tt.wantErr {
assert.Error(t, err)
} else {
Expand Down Expand Up @@ -150,7 +150,7 @@ func Test_parse(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := parse(content, false, tt.splitter, tt.loaderFactory, tt.converter)
_, err := parse(content, true, tt.splitter, tt.loaderFactory, tt.converter)
if tt.wantErr {
assert.Error(t, err)
} else {
Expand Down
4 changes: 2 additions & 2 deletions pkg/loaders/test/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func TestLoad(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := Load(tt.path, false)
got, err := Load(tt.path, true)
if tt.wantErr {
assert.Error(t, err)
} else {
Expand Down Expand Up @@ -273,7 +273,7 @@ func Test_parse(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := parse(content, false, tt.splitter, tt.loaderFactory, tt.converter)
_, err := parse(content, true, tt.splitter, tt.loaderFactory, tt.converter)
if tt.wantErr {
assert.Error(t, err)
} else {
Expand Down

0 comments on commit 1f6bf6f

Please sign in to comment.