diff options
Diffstat (limited to 'packages/astro/test/config-path.test.js')
-rw-r--r-- | packages/astro/test/config-path.test.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/astro/test/config-path.test.js b/packages/astro/test/config-path.test.js new file mode 100644 index 000000000..33e2cf3b7 --- /dev/null +++ b/packages/astro/test/config-path.test.js @@ -0,0 +1,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(); |