dea1a6dfc9
* chore: update defaults in docs * chore: update config defaults * test: update tests to config defaults * chore: update gitignore to new defaults * docs: update readme to new defaults * chore: update examples to new defaults * chore: update default exclude in lang server * chore: update tests * test: fix failing tests * chore: update www defaults
24 lines
665 B
JavaScript
24 lines
665 B
JavaScript
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();
|