ray-template/__test__/app/prefixCacheKey.spec.ts
XiaoDaiGua-Ray 403fdd589a feat!: rebuild Ray Template as a monorepo
Share workspace packages between Ray Admin and the interactive docs.

BREAKING CHANGE: v6 is a new major line. v5 stays on legacy/v5.
2026-11-04 14:01:28 +08:00

17 lines
457 B
TypeScript

import { prefixCacheKey } from '../../apps/admin/src/utils/app/prefix-cache-key'
describe('prefixCacheKey', () => {
it('should return the key with the default prefix', () => {
const key = 'signing'
expect(prefixCacheKey(key)).toBe(key)
})
it('should return the key with the custom prefix', () => {
const key = 'signing'
const customPrefix = 'ray-'
expect(prefixCacheKey(key, { customPrefix })).toBe(customPrefix + key)
})
})