Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Deno v2 doesn't support .cts extension #744

Merged
merged 3 commits into from
Sep 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions test/e2e/runners.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ describe('Test Runtimes/Platforms + Extensions', async () => {
hasNode &&
(await it('Node.js', async () => {
const output = await inspectCLI(
'npx tsx src/bin/index.ts --platform=node test/__fixtures__/e2e/extensions'
'npx tsx src/bin/index.ts --platform=node test/__fixtures__/e2e/extensions -d'
);

if (output.exitCode !== 0) {
console.log(output.stdout);
console.log(output.stderr);
}

assert.strictEqual(output.exitCode, 0, 'Exit Code needs to be 0');
assert(/PASS › 12/.test(output.stdout), 'CLI needs to pass 1');
assert(/FAIL › 0/.test(output.stdout), 'CLI needs to fail 0');
Expand All @@ -57,9 +62,14 @@ describe('Test Runtimes/Platforms + Extensions', async () => {
hasBun &&
(await it('Bun', async () => {
const output = await inspectCLI(
'bun src/bin/index.ts --platform=bun test/__fixtures__/e2e/extensions'
'bun src/bin/index.ts --platform=bun test/__fixtures__/e2e/extensions -d'
);

if (output.exitCode !== 0) {
console.log(output.stdout);
console.log(output.stderr);
}

assert.strictEqual(output.exitCode, 0, 'Exit Code needs to be 0');
assert(/PASS › 12/.test(output.stdout), 'CLI needs to pass 1');
assert(/FAIL › 0/.test(output.stdout), 'CLI needs to fail 0');
Expand All @@ -74,17 +84,22 @@ describe('Test Runtimes/Platforms + Extensions', async () => {
hasDeno &&
(await it('Deno', async () => {
const output = await inspectCLI(
'deno run --unstable-sloppy-imports --allow-read --allow-env --allow-run src/bin/index.ts --platform=deno test/__fixtures__/e2e/extensions'
'deno run --unstable-sloppy-imports --allow-read --allow-env --allow-run src/bin/index.ts --platform=deno test/__fixtures__/e2e/extensions -d --exclude=.cts'
);

if (output.exitCode !== 0) {
console.log(output.stdout);
console.log(output.stderr);
}

assert.strictEqual(output.exitCode, 0, 'Exit Code needs to be 0');
assert(/PASS › 12/.test(output.stdout), 'CLI needs to pass 1');
assert(/PASS › 10/.test(output.stdout), 'CLI needs to pass 1');
assert(/FAIL › 0/.test(output.stdout), 'CLI needs to fail 0');
assert(/deno run.+?.js/.test(output.stdout), 'deno => .js');
assert(/deno run.+?.cjs/.test(output.stdout), 'deno => .cjs');
assert(/deno run.+?.mjs/.test(output.stdout), 'deno => .mjs');
assert(/deno run.+?.ts/.test(output.stdout), 'deno => .ts');
assert(/deno run.+?.cts/.test(output.stdout), 'deno => .cts');
// assert(/deno run.+?.cts/.test(output.stdout), 'deno => .cts');
assert(/deno run.+?.mts/.test(output.stdout), 'deno => .mts');
}));
});
Loading