mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
e93d6a30a4
* migrate web package to vitest * migrate node-api to vitest * migrate file-locking vitest * migrate cli * remove jest from npm packages * Create weak-cherries-serve.md * update ci
23 lines
748 B
TypeScript
23 lines
748 B
TypeScript
import request from 'supertest';
|
|
import { describe, expect, test } from 'vitest';
|
|
|
|
import { runServer } from '../src';
|
|
|
|
describe('startServer via API', () => {
|
|
// TODO: fix this test does not runs with vitest
|
|
test.skip('should provide all HTTP server data', async () => {
|
|
const webServer = await runServer();
|
|
expect(webServer).toBeDefined();
|
|
await request(webServer).get('/').expect(200);
|
|
});
|
|
|
|
test('should fail on start with empty configuration', async () => {
|
|
// @ts-expect-error
|
|
await expect(runServer({})).rejects.toThrow('configPath property is required');
|
|
});
|
|
|
|
test('should fail on start with null as entry', async () => {
|
|
// @ts-expect-error
|
|
await expect(runServer(null)).rejects.toThrow();
|
|
});
|
|
});
|