mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
17 lines
658 B
TypeScript
17 lines
658 B
TypeScript
import { describe, expect, it, vi } from 'vitest'
|
|
import { Context } from '@deepseek-ai/cordis'
|
|
import { apply, inject, name } from '../src/invariant.ts'
|
|
|
|
describe('@deepseek-ai/dsh-session-log-export/invariant', () => {
|
|
it('registers the package-owned empty companion', async () => {
|
|
const register = vi.fn(() => vi.fn())
|
|
const ctx = new Context()
|
|
ctx.provide('invariants', { register })
|
|
const dispose = await apply(ctx)
|
|
expect(name).toBe('session-export-invariant')
|
|
expect(inject).toEqual(['invariants'])
|
|
expect(register).toHaveBeenCalledWith('@deepseek-ai/dsh-session-log-export', expect.any(Function))
|
|
dispose()
|
|
})
|
|
})
|