mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
* chore(office): upgrade libreoffice kit to 0.0.1-2 * fix(office): guide bounded CLI rendering and preview reuse * chore(office): consume published LibreOffice Kit 0.0.3 * test(office): mock the complete LibreOffice converter interface * chore(office): upgrade LibreOffice Kit to 0.0.4 * fix(office): expose bundled LibreOffice Kit 0.1.0 CLI across deployments * fix(office): inspect Excel visuals only for layout tasks * fix(office): allow compatible LibreOffice Kit 0.1 updates * fix(office): stop Excel QA on blank previews and run regressions in CI * fix(office): end workbook visual QA after an empty preview
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import { expect, it } from 'vitest'
|
|
import { selectOfficeEngine } from './libreoffice-packages.mjs'
|
|
|
|
it.each([
|
|
['darwin', 'arm64', 'darwin-arm64'], ['darwin', 'x64', 'darwin-x64'],
|
|
['win32', 'arm64', 'win32-arm64'], ['win32', 'x64', 'win32-x64'],
|
|
['linux', 'x64', 'wasm'], ['linux', 'arm64', 'wasm'],
|
|
['darwin', 'other', 'wasm'], ['freebsd', 'x64', 'wasm'],
|
|
])('selects the declared engine for %s/%s', (platform, arch, expected) => {
|
|
const optionalDependencies = Object.fromEntries(
|
|
['darwin-arm64', 'darwin-x64', 'win32-arm64', 'win32-x64', 'wasm']
|
|
.map(engine => [`@deepseek-ai/libreoffice-kit-${engine}`, '0.0.1']),
|
|
)
|
|
expect(selectOfficeEngine({ optionalDependencies }, { platform, arch })).toBe(expected)
|
|
})
|
|
|
|
it('selects a declared Linux native target without an OS-specific policy change', () => {
|
|
expect(selectOfficeEngine({ optionalDependencies: { '@deepseek-ai/libreoffice-kit-linux-x64': '1' } },
|
|
{ platform: 'linux', arch: 'x64' })).toBe('linux-x64')
|
|
})
|
|
|
|
it('uses WASM when no native targets are declared', () => {
|
|
expect(selectOfficeEngine({}, { platform: 'darwin', arch: 'x64' })).toBe('wasm')
|
|
})
|