summaryrefslogtreecommitdiff
path: root/packages/create-astro/test/git.test.js
diff options
context:
space:
mode:
authorGravatar Shoaib Khan <56039103+shoaibkh4n@users.noreply.github.com> 2024-02-13 20:11:59 +0530
committerGravatar GitHub <noreply@github.com> 2024-02-13 14:41:59 +0000
commit3007d24c98e607442903a3c0aaaea195390a25e7 (patch)
tree8a993608a3d35b47c8c5e016cc45359f4578af64 /packages/create-astro/test/git.test.js
parentbd877d389a6ebdd995e253bcb9daccef52b2277f (diff)
downloadastro-3007d24c98e607442903a3c0aaaea195390a25e7.tar.gz
astro-3007d24c98e607442903a3c0aaaea195390a25e7.tar.zst
astro-3007d24c98e607442903a3c0aaaea195390a25e7.zip
chore: Migrate all `packages/create-astro/test` to node:test (#10084)
* 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>
Diffstat (limited to 'packages/create-astro/test/git.test.js')
-rw-r--r--packages/create-astro/test/git.test.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/create-astro/test/git.test.js b/packages/create-astro/test/git.test.js
index d05ad5bdc..f1c8eba0e 100644
--- a/packages/create-astro/test/git.test.js
+++ b/packages/create-astro/test/git.test.js
@@ -1,4 +1,5 @@
-import { expect } from 'chai';
+import assert from 'node:assert/strict';
+import { describe, it, before, after } from 'node:test';
import { mkdir, writeFile } from 'node:fs/promises';
import { rmSync } from 'node:fs';
@@ -12,21 +13,20 @@ describe('git', () => {
const context = { cwd: '', dryRun: true, prompt: () => ({ git: false }) };
await git(context);
- expect(fixture.hasMessage('Skipping Git initialization')).to.be.true;
+ assert.ok(fixture.hasMessage('Skipping Git initialization'));
});
it('yes (--dry-run)', async () => {
const context = { cwd: '', dryRun: true, prompt: () => ({ git: true }) };
await git(context);
-
- expect(fixture.hasMessage('Skipping Git initialization')).to.be.true;
+ assert.ok(fixture.hasMessage('Skipping Git initialization'));
});
it('no (--dry-run)', async () => {
const context = { cwd: '', dryRun: true, prompt: () => ({ git: false }) };
await git(context);
- expect(fixture.hasMessage('Skipping Git initialization')).to.be.true;
+ assert.ok(fixture.hasMessage('Skipping Git initialization'));
});
});
@@ -48,7 +48,7 @@ describe('git initialized', () => {
};
await git(context);
- expect(fixture.hasMessage('Git has already been initialized')).to.be.true;
+ assert.ok(fixture.hasMessage('Git has already been initialized'));
});
after(() => {