27 lines
654 B
JavaScript
27 lines
654 B
JavaScript
import test from 'node:test'
|
|
import assert from 'node:assert/strict'
|
|
|
|
import { resolveBindingMatchShopIds } from './fulfillment-bootstrap-service.js'
|
|
|
|
test('resolveBindingMatchShopIds returns configured shop id for 91kaquan kuaishou bindings', () => {
|
|
assert.deepEqual(
|
|
resolveBindingMatchShopIds({
|
|
provider: '91kaquan',
|
|
platform: 'kuaishou',
|
|
shopId: '91kaquan',
|
|
}),
|
|
['91kaquan'],
|
|
)
|
|
})
|
|
|
|
test('resolveBindingMatchShopIds preserves wildcard rules for empty shop id', () => {
|
|
assert.deepEqual(
|
|
resolveBindingMatchShopIds({
|
|
provider: 'agiso',
|
|
platform: 'xianyu',
|
|
shopId: '',
|
|
}),
|
|
[''],
|
|
)
|
|
})
|