mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Add Nostr AI tools
This commit is contained in:
19 files changed
+1671
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
import { HTTPError } from './HTTPError.ts';
|
||||
|
||||
describe('HTTPError', () => {
|
||||
it('should create HTTPError with correct properties', () => {
|
||||
const request = new Request('https://example.com/api');
|
||||
const response = new Response('Not Found', { status: 404 });
|
||||
|
||||
const error = new HTTPError(response, request);
|
||||
|
||||
expect(error.name).toBe('HTTPError');
|
||||
expect(error.message).toBe('HTTP Error: 404 GET https://example.com/api');
|
||||
expect(error.response).toBe(response);
|
||||
expect(error.request).toBe(request);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user