mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
bd8703e871
* feat: add migrateToSecureLegacySignature property * Update config.ts * changeset * Update ci.yml * Update config.spec.ts
20 lines
619 B
TypeScript
20 lines
619 B
TypeScript
import request from 'supertest';
|
|
|
|
import { runServer } from '../src';
|
|
|
|
describe('startServer via API', () => {
|
|
test('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 () => {
|
|
await expect(runServer(null)).rejects.toThrow();
|
|
});
|
|
});
|