Skip to content

Commit

Permalink
tests: add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
ldez committed Apr 2, 2024
1 parent 7cfdb7f commit 005b33c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/section/local_module_test.go
@@ -0,0 +1,16 @@
package section

import (
"testing"

"github.com/daixiang0/gci/pkg/specificity"
)

func TestLocalModule_specificity(t *testing.T) {
testCases := []specificityTestData{
{"example.com/hello", &LocalModule{Path: "example.com/hello"}, specificity.LocalModule{}},
{"example.com/hello/world", &LocalModule{Path: "example.com/hello"}, specificity.LocalModule{}},
{"example.com/hello-test", &LocalModule{Path: "example.com/hello"}, specificity.MisMatch{}},
}
testSpecificity(t, testCases)
}

0 comments on commit 005b33c

Please sign in to comment.