Skip to content

Commit

Permalink
chore: rename playground to e2e-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jevon617 committed Dec 4, 2024
1 parent 2ce664a commit d122e37
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 159 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 2 additions & 9 deletions playground/tests/basic.spec.ts → e2e-test/tests/basic.spec.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import fs from 'node:fs'
import path, { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import type { Page } from '@playwright/test'
import { expect, test } from '@playwright/test'
import type { ViteDevServer } from 'vite'
import { createViteServer } from '../server'

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

function sleep(delay: number) {
return new Promise(resolve => setTimeout(resolve, delay))
}
import { __dirname, sleep } from './utlis'

test.describe('basic', () => {
let fileNames: string[]
Expand Down
11 changes: 2 additions & 9 deletions playground/tests/prop.spec.ts → e2e-test/tests/prop.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import fs from 'node:fs'
import path, { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import type { Page } from '@playwright/test'
import { expect, test } from '@playwright/test'
import { createViteServer } from '../server'

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

function sleep(delay: number) {
return new Promise(resolve => setTimeout(resolve, delay))
}
import { __dirname, sleep } from './utlis'

test.describe('prop', () => {
const port = 7071
Expand Down
9 changes: 9 additions & 0 deletions e2e-test/tests/utlis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

export function sleep(delay: number) {
return new Promise(resolve => setTimeout(resolve, delay))
}

export const __filename = fileURLToPath(import.meta.url)
export const __dirname = dirname(__filename)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"test:e2e": "pnpm -C playground test"
"test:e2e": "pnpm -C e2e-test test"
},
"dependencies": {
"cors": "^2.8.5",
Expand Down
Loading

0 comments on commit d122e37

Please sign in to comment.