mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
3007d24c98
* chore: Migrate All packages/create-astro/test to node:test * Some minor fix * Requested Changes done * Reopen * Apply suggestions from code review * let's test with concurrency * chore: fix possible false positive tests * todo test * skip tests * Apply suggestions from code review --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
20 lines
700 B
JavaScript
20 lines
700 B
JavaScript
import assert from 'node:assert/strict';
|
|
import { describe, it } from 'node:test';
|
|
import { intro } from '../dist/index.js';
|
|
import { setup } from './utils.js';
|
|
|
|
describe('intro', () => {
|
|
const fixture = setup();
|
|
|
|
it('no arguments', async () => {
|
|
await intro({ skipHouston: false, version: '0.0.0', username: 'user' });
|
|
assert.ok(fixture.hasMessage('Houston:'));
|
|
assert.ok(fixture.hasMessage('Welcome to astro v0.0.0'));
|
|
});
|
|
it('--skip-houston', async () => {
|
|
await intro({ skipHouston: true, version: '0.0.0', username: 'user' });
|
|
assert.equal(fixture.length(), 1);
|
|
assert.ok(!fixture.hasMessage('Houston:'));
|
|
assert.ok(fixture.hasMessage('Launch sequence initiated'));
|
|
});
|
|
});
|