2024-02-13 09:41:59 -05:00
|
|
|
import assert from 'node:assert/strict';
|
|
|
|
import { describe, it } from 'node:test';
|
2023-02-06 11:19:37 -05:00
|
|
|
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' });
|
2024-02-13 09:41:59 -05:00
|
|
|
assert.ok(fixture.hasMessage('Houston:'));
|
|
|
|
assert.ok(fixture.hasMessage('Welcome to astro v0.0.0'));
|
2023-02-06 11:21:48 -05:00
|
|
|
});
|
2023-02-06 11:19:37 -05:00
|
|
|
it('--skip-houston', async () => {
|
|
|
|
await intro({ skipHouston: true, version: '0.0.0', username: 'user' });
|
2024-02-13 09:41:59 -05:00
|
|
|
assert.equal(fixture.length(), 1);
|
|
|
|
assert.ok(!fixture.hasMessage('Houston:'));
|
|
|
|
assert.ok(fixture.hasMessage('Launch sequence initiated'));
|
2023-02-06 11:21:48 -05:00
|
|
|
});
|
|
|
|
});
|