summaryrefslogtreecommitdiff
path: root/packages/create-astro/test/template.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/create-astro/test/template.test.js')
-rw-r--r--packages/create-astro/test/template.test.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/packages/create-astro/test/template.test.js b/packages/create-astro/test/template.test.js
index aef7e1944..821ac9c2e 100644
--- a/packages/create-astro/test/template.test.js
+++ b/packages/create-astro/test/template.test.js
@@ -1,43 +1,39 @@
-import { expect } from 'chai';
-
+import assert from 'node:assert/strict';
+import { describe, it } from 'node:test';
import { template } from '../dist/index.js';
import { setup } from './utils.js';
-describe('template', () => {
+describe('template', async () => {
const fixture = setup();
it('none', async () => {
const context = { template: '', cwd: '', dryRun: true, prompt: () => ({ template: 'blog' }) };
await template(context);
-
- expect(fixture.hasMessage('Skipping template copying')).to.be.true;
- expect(context.template).to.eq('blog');
+ assert.ok(fixture.hasMessage('Skipping template copying'));
+ assert.equal(context.template, 'blog');
});
it('minimal (--dry-run)', async () => {
const context = { template: 'minimal', cwd: '', dryRun: true, prompt: () => {} };
await template(context);
- expect(fixture.hasMessage('Using minimal as project template')).to.be.true;
+ assert.ok(fixture.hasMessage('Using minimal as project template'));
});
it('basics (--dry-run)', async () => {
const context = { template: 'basics', cwd: '', dryRun: true, prompt: () => {} };
await template(context);
-
- expect(fixture.hasMessage('Using basics as project template')).to.be.true;
+ assert.ok(fixture.hasMessage('Using basics as project template'));
});
it('blog (--dry-run)', async () => {
const context = { template: 'blog', cwd: '', dryRun: true, prompt: () => {} };
await template(context);
-
- expect(fixture.hasMessage('Using blog as project template')).to.be.true;
+ assert.ok(fixture.hasMessage('Using blog as project template'));
});
it('minimal (--yes)', async () => {
const context = { template: 'minimal', cwd: '', dryRun: true, yes: true, prompt: () => {} };
await template(context);
-
- expect(fixture.hasMessage('Using minimal as project template')).to.be.true;
+ assert.ok(fixture.hasMessage('Using minimal as project template'));
});
});