mirror of
https://github.com/morten-olsen/http.md.git
synced 2026-02-08 00:46:28 +01:00
24 lines
651 B
TypeScript
24 lines
651 B
TypeScript
import { resolve } from 'path';
|
|
|
|
import { describe, it, expect, beforeAll, afterEach, afterAll } from 'vitest';
|
|
|
|
import { Context, execute } from '../src/exports.js';
|
|
|
|
import { server } from './mocks/node.js';
|
|
|
|
describe('execute', () => {
|
|
beforeAll(() => server.listen());
|
|
afterEach(() => server.resetHandlers());
|
|
afterAll(() => server.close());
|
|
|
|
it('should correctly render the readme file', async () => {
|
|
const context = new Context();
|
|
const filePath = resolve(__dirname, '..', 'docs', 'README.md');
|
|
const result = await execute(filePath, {
|
|
context,
|
|
});
|
|
|
|
expect(result.markdown).toMatchSnapshot();
|
|
}, 30000);
|
|
});
|