mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 00:35:51 +00:00
feat: /login支持codex订阅登录
This commit is contained in:
26
src/buddy/__tests__/companion.test.ts
Normal file
26
src/buddy/__tests__/companion.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, test } from 'bun:test'
|
||||
import { inferLegacyCompanionBones } from '../companion.js'
|
||||
|
||||
describe('inferLegacyCompanionBones', () => {
|
||||
test('infers species and rarity from legacy seedless companion text', () => {
|
||||
expect(
|
||||
inferLegacyCompanionBones({
|
||||
name: 'Biscuit',
|
||||
personality: 'A common mushroom of few words.',
|
||||
}),
|
||||
).toEqual({
|
||||
species: 'mushroom',
|
||||
rarity: 'common',
|
||||
})
|
||||
})
|
||||
|
||||
test('does not override seeded companions', () => {
|
||||
expect(
|
||||
inferLegacyCompanionBones({
|
||||
name: 'Spore',
|
||||
personality: 'A common mushroom of few words.',
|
||||
seed: 'rehatch-1',
|
||||
}),
|
||||
).toEqual({})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user