blob: 33e2cf3b757eb31766dbf1fec9e4aa97ef801fee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import { suite } from 'uvu';
import * as assert from 'uvu/assert';
import { runDevServer } from './helpers.js';
const ConfigPath = suite('Config path');
const root = new URL('./fixtures/config-path/', import.meta.url);
ConfigPath('can be passed via --config', async (context) => {
const configPath = new URL('./config/my-config.mjs', root).pathname;
const args = ['--config', configPath];
const process = runDevServer(root, args);
process.stdout.setEncoding('utf8');
for await (const chunk of process.stdout) {
if(/Server started/.test(chunk)) {
break;
}
}
process.kill();
assert.ok(true, 'Server started');
});
ConfigPath.run();
|