prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

esm

Tyler 513fc05d 199c0703

+15 -10
+3 -2
packages/cli/tests/integration/cli.test.ts
··· 1 1 import { expect, test, describe } from "vitest"; 2 2 import { spawn } from "node:child_process"; 3 - import { join } from "node:path"; 3 + import { join, dirname } from "node:path"; 4 + import { fileURLToPath } from "node:url"; 4 5 5 6 describe("CLI Integration", () => { 6 7 test("shows error when called without arguments", async () => { ··· 55 56 args: string[] = [], 56 57 ): Promise<{ stdout: string; stderr: string; code: number }> { 57 58 return new Promise((resolve) => { 58 - const cliPath = join(__dirname, "../../lib/index.js"); 59 + const cliPath = join(dirname(fileURLToPath(import.meta.url)), "../../lib/index.js"); 59 60 const child = spawn("node", [cliPath, ...args]); 60 61 61 62 let stdout = "";
+3 -2
packages/cli/tests/integration/error-handling.test.ts
··· 1 1 import { expect, test, describe, beforeEach, afterEach } from "vitest"; 2 2 import { mkdir, writeFile, rm } from "node:fs/promises"; 3 - import { join } from "node:path"; 3 + import { join, dirname } from "node:path"; 4 4 import { tmpdir } from "node:os"; 5 5 import { spawn } from "node:child_process"; 6 + import { fileURLToPath } from "node:url"; 6 7 7 8 describe("CLI Error Handling", () => { 8 9 let testDir: string; ··· 158 159 args: string[], 159 160 ): Promise<{ stdout: string; stderr: string; code: number }> { 160 161 return new Promise((resolve) => { 161 - const cliPath = join(__dirname, "../../lib/index.js"); 162 + const cliPath = join(dirname(fileURLToPath(import.meta.url)), "../../lib/index.js"); 162 163 const child = spawn("node", [cliPath, ...args]); 163 164 164 165 let stdout = "";
+3 -2
packages/cli/tests/integration/filesystem.test.ts
··· 7 7 access, 8 8 constants, 9 9 } from "node:fs/promises"; 10 - import { join } from "node:path"; 10 + import { join, dirname } from "node:path"; 11 11 import { tmpdir } from "node:os"; 12 12 import { spawn } from "node:child_process"; 13 + import { fileURLToPath } from "node:url"; 13 14 14 15 describe("CLI File System Handling", () => { 15 16 let testDir: string; ··· 189 190 args: string[], 190 191 ): Promise<{ stdout: string; stderr: string; code: number }> { 191 192 return new Promise((resolve) => { 192 - const cliPath = join(__dirname, "../../lib/index.js"); 193 + const cliPath = join(dirname(fileURLToPath(import.meta.url)), "../../lib/index.js"); 193 194 const child = spawn("node", [cliPath, ...args]); 194 195 195 196 let stdout = "";
+3 -2
packages/cli/tests/integration/workflow.test.ts
··· 1 1 import { expect, test, describe, beforeEach, afterEach } from "vitest"; 2 2 import { mkdir, writeFile, rm, readFile } from "node:fs/promises"; 3 - import { join } from "node:path"; 3 + import { join, dirname } from "node:path"; 4 4 import { tmpdir } from "node:os"; 5 5 import { spawn } from "node:child_process"; 6 + import { fileURLToPath } from "node:url"; 6 7 7 8 describe("CLI End-to-End Workflow", () => { 8 9 let testDir: string; ··· 194 195 args: string[], 195 196 ): Promise<{ stdout: string; stderr: string; code: number }> { 196 197 return new Promise((resolve) => { 197 - const cliPath = join(__dirname, "../../lib/index.js"); 198 + const cliPath = join(dirname(fileURLToPath(import.meta.url)), "../../lib/index.js"); 198 199 const child = spawn("node", [cliPath, ...args], { 199 200 cwd: process.cwd(), 200 201 env: process.env,
+3 -2
packages/cli/tests/performance/large-schema-set.test.ts
··· 1 1 import { expect, test, describe, beforeEach, afterEach } from "vitest"; 2 2 import { mkdir, writeFile, rm } from "node:fs/promises"; 3 - import { join } from "node:path"; 3 + import { join, dirname } from "node:path"; 4 4 import { tmpdir } from "node:os"; 5 5 import { spawn } from "node:child_process"; 6 + import { fileURLToPath } from "node:url"; 6 7 7 8 describe("CLI Performance", () => { 8 9 let testDir: string; ··· 213 214 args: string[], 214 215 ): Promise<{ stdout: string; stderr: string; code: number }> { 215 216 return new Promise((resolve) => { 216 - const cliPath = join(__dirname, "../../lib/index.js"); 217 + const cliPath = join(dirname(fileURLToPath(import.meta.url)), "../../lib/index.js"); 217 218 const child = spawn("node", [cliPath, ...args]); 218 219 219 220 let stdout = "";