14 lines
275 B
Go
14 lines
275 B
Go
package tel
|
|
|
|
import "testing"
|
|
|
|
func TestPreCheckDefaultsToChina(t *testing.T) {
|
|
got, err := (&validator{}).PreCheck("13800138000", map[string]any{})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if got != "tel:+8613800138000" {
|
|
t.Fatalf("got %q, want tel:+8613800138000", got)
|
|
}
|
|
}
|