Skip to content

Commit 7b2a8a3

Browse files
committed
test: fix backend-integration root path
1 parent 234695b commit 7b2a8a3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

playground/backend-integration/__test__/__snapshots__/test.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Vitest Snapshot v1
22

3-
exports[`backend-integration > serve > get initial error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | const [count, setCount] = useState<string>(0)/n | ^/n 7 |/n 8 | return (/n 9 | <div className=/\\"App/\\">\\",\\"id\\":\\"<PROJECT_ROOT>/playground/backend-integration/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":46,\\"file\\":\\"<PROJECT_ROOT>/playground/backend-integration/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`;
3+
exports[`backend-integration > serve > get initial error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | const [count, setCount] = useState<string>(0)/n | ^/n 7 |/n 8 | return (/n 9 | <div className=/\\"App/\\">\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/backend-integration/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":46,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/backend-integration/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`;
44

55
exports[`backend-integration > serve > get initial error 2`] = `
66
"
77
ERROR(TypeScript) Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.
8-
FILE <PROJECT_ROOT>/playground/backend-integration/src/App.tsx:6:46
8+
FILE <PROJECT_ROOT>/playground-temp/backend-integration/src/App.tsx:6:46
99
1010
4 |
1111
5 | function App() {

playground/backend-integration/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
1010
const rootDir = path.resolve(__dirname)
1111
export const port = 3008
1212

13-
export async function createServer(port) {
13+
export async function createServer() {
1414
const app = express()
1515
const viteDevServer = await createViteServer({ root: rootDir })
1616

playground/vitestSetup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ beforeAll(async (s) => {
114114
rootDir = fs.existsSync(testCustomRoot) ? testCustomRoot : testDir
115115

116116
const testCustomServe = [
117-
resolve(dirname(testPath), 'serve.ts'),
118-
resolve(dirname(testPath), 'serve.js'),
117+
resolve(dirname(rootDir), 'serve.ts'),
118+
resolve(dirname(rootDir), 'serve.js'),
119119
].find((i) => fs.existsSync(i))
120120

121121
if (testCustomServe && isServe) {

0 commit comments

Comments
 (0)