aboutsummaryrefslogtreecommitdiff
path: root/packages/create-astro/test/intro.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/create-astro/test/intro.test.js')
-rw-r--r--packages/create-astro/test/intro.test.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/create-astro/test/intro.test.js b/packages/create-astro/test/intro.test.js
new file mode 100644
index 000000000..d042dad7f
--- /dev/null
+++ b/packages/create-astro/test/intro.test.js
@@ -0,0 +1,20 @@
+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'));
+ });
+});