Skip to content

Commit

Permalink
test: fix backend-integration root path
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jan 15, 2023
1 parent 234695b commit 7b2a8a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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<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\\":\\"\\"}]"`;
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\\":\\"\\"}]"`;

exports[`backend-integration > serve > get initial error 2`] = `
"
ERROR(TypeScript) Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.
FILE <PROJECT_ROOT>/playground/backend-integration/src/App.tsx:6:46
FILE <PROJECT_ROOT>/playground-temp/backend-integration/src/App.tsx:6:46
4 |
5 | function App() {
Expand Down
2 changes: 1 addition & 1 deletion playground/backend-integration/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })

Expand Down
4 changes: 2 additions & 2 deletions playground/vitestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7b2a8a3

Please sign in to comment.