mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 06:16:37 +08:00
a963b8bf54
make prettier 统一格式化,goimports 与 eslint unused-imports 自动移除未使用导入。
18 lines
443 B
Go
18 lines
443 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package routeidentity
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestDecodeDomainsNormalizesCaseAndOrder(t *testing.T) {
|
|
domains, err := DecodeDomains(`["WWW.Example.COM","example.com"]`, "fallback.example.com")
|
|
require.NoError(t, err)
|
|
assert.Equal(t, []string{"www.example.com", "example.com"}, domains)
|
|
}
|