Download src/server/__tests__/computer-use-requirements.test.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 985 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/server/__tests__/computer-use-requirements.test.ts
- Command line
-
hf download hf://chenbhao/codev@afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/server/__tests__/computer-use-requirements.test.ts
-
curl -L -o computer-use-requirements.test.ts https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/server/__tests__/computer-use-requirements.test.ts
985 Bytes
| import { describe, expect, test } from 'bun:test' | |
| import darwinRequirements from '../../../runtime/requirements.txt' with { type: 'text' } | |
| import win32Requirements from '../../../runtime/requirements-win.txt' with { type: 'text' } | |
| function findRequirement(requirements: string, packageName: string): string | undefined { | |
| return requirements | |
| .split(/\r?\n/) | |
| .map(line => line.trim()) | |
| .find(line => line.startsWith(`${packageName}`)) | |
| } | |
| describe('computer use requirements', () => { | |
| test('pins mss to the last Python 3.8-compatible major version', () => { | |
| expect(findRequirement(darwinRequirements, 'mss')).toBe('mss>=9.0.2,<10') | |
| expect(findRequirement(win32Requirements, 'mss')).toBe('mss>=9.0.2,<10') | |
| }) | |
| test('pins Pillow to the Python 3.9-compatible 11.x major line', () => { | |
| expect(findRequirement(darwinRequirements, 'Pillow')).toBe('Pillow>=11.3.0,<12') | |
| expect(findRequirement(win32Requirements, 'Pillow')).toBe('Pillow>=11.3.0,<12') | |
| }) | |
| }) | |