diff --git a/playground/backend-integration/__test__/__snapshots__/test.spec.ts.snap b/playground/backend-integration/__test__/__snapshots__/test.spec.ts.snap index ebfc14c8..01f157f6 100644 --- a/playground/backend-integration/__test__/__snapshots__/test.spec.ts.snap +++ b/playground/backend-integration/__test__/__snapshots__/test.spec.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1 -exports[`backend-integration > serve > get initial error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | const [count, setCount] = useState(0)/n | ^/n 7 |/n 8 | return (/n 9 |
\\",\\"id\\":\\"/playground/backend-integration/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":46,\\"file\\":\\"/playground/backend-integration/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`; +exports[`backend-integration > serve > get initial error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | const [count, setCount] = useState(0)/n | ^/n 7 |/n 8 | return (/n 9 |
\\",\\"id\\":\\"/playground-temp/backend-integration/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":46,\\"file\\":\\"/playground-temp/backend-integration/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`; exports[`backend-integration > serve > get initial error 2`] = ` " ERROR(TypeScript) Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'. - FILE /playground/backend-integration/src/App.tsx:6:46 + FILE /playground-temp/backend-integration/src/App.tsx:6:46 4 | 5 | function App() { diff --git a/playground/backend-integration/server.js b/playground/backend-integration/server.js index d12b6679..654d29fb 100644 --- a/playground/backend-integration/server.js +++ b/playground/backend-integration/server.js @@ -10,7 +10,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)) const rootDir = path.resolve(__dirname) export const port = 3008 -export async function createServer(port) { +export async function createServer() { const app = express() const viteDevServer = await createViteServer({ root: rootDir }) diff --git a/playground/vitestSetup.ts b/playground/vitestSetup.ts index f48f0abc..29446901 100644 --- a/playground/vitestSetup.ts +++ b/playground/vitestSetup.ts @@ -114,8 +114,8 @@ beforeAll(async (s) => { rootDir = fs.existsSync(testCustomRoot) ? testCustomRoot : testDir const testCustomServe = [ - resolve(dirname(testPath), 'serve.ts'), - resolve(dirname(testPath), 'serve.js'), + resolve(dirname(rootDir), 'serve.ts'), + resolve(dirname(rootDir), 'serve.js'), ].find((i) => fs.existsSync(i)) if (testCustomServe && isServe) {