openai-code
Version:
An unofficial proxy layer that lets you use Anthropic Claude Code with any OpenAI API backend.
25 lines (20 loc) • 742 B
JavaScript
import { describe, it, expect } from 'vitest';
import { md5 } from './md5.mjs';
describe('md5 tests', () => {
it('should return MD5 hash for empty string', () => {
const result = md5('');
expect(result).toBe('d41d8cd98f00b204e9800998ecf8427e');
});
it('should return MD5 hash for "hello"', () => {
const result = md5('hello');
expect(result).toBe('5d41402abc4b2a76b9719d911017c592');
});
it('should return MD5 hash for Buffer input', () => {
const result = md5(Buffer.from('hello world'));
expect(result).toBe('5eb63bbbe01eeed093cb22bb8f5acdc3');
});
it('should return MD5 hash for "abc"', () => {
const result = md5('abc');
expect(result).toBe('900150983cd24fb0d6963f7d28e17f72');
});
});