Skip to content

Commit

Permalink
chore: fix lint, return types of serve() in tests (#8380)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 29, 2022
1 parent 337b197 commit 5161ecd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion playground/lib/__tests__/serve.ts
Expand Up @@ -16,7 +16,7 @@ import {

export const port = ports.lib

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
setupConsoleWarnCollector()

if (!isBuild) {
Expand Down
2 changes: 1 addition & 1 deletion playground/optimize-missing-deps/__test__/serve.ts
Expand Up @@ -6,7 +6,7 @@ import { hmrPorts, ports, rootDir } from '~utils'

export const port = ports['optimize-missing-deps']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
const { createServer } = require(path.resolve(rootDir, 'server.js'))
const { app, vite } = await createServer(
rootDir,
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-deps/__tests__/serve.ts
Expand Up @@ -7,7 +7,7 @@ import { hmrPorts, ports, rootDir } from '~utils'

export const port = ports['ssr-deps']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
await kill(port)

const { createServer } = require(path.resolve(rootDir, 'server.js'))
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-html/__tests__/serve.ts
Expand Up @@ -7,7 +7,7 @@ import { hmrPorts, ports, rootDir } from '~utils'

export const port = ports['ssr-html']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
await kill(port)

const { createServer } = require(path.resolve(rootDir, 'server.js'))
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-pug/__tests__/serve.ts
Expand Up @@ -7,7 +7,7 @@ import { hmrPorts, ports, rootDir } from '~utils'

export const port = ports['ssr-pug']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
await kill(port)

const { createServer } = require(path.resolve(rootDir, 'server.js'))
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-react/__tests__/serve.ts
Expand Up @@ -7,7 +7,7 @@ import { hmrPorts, isBuild, ports, rootDir } from '~utils'

export const port = ports['ssr-react']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
if (isBuild) {
// build first
const { build } = await import('vite')
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-vue/__tests__/serve.ts
Expand Up @@ -7,7 +7,7 @@ import { hmrPorts, isBuild, ports, rootDir } from '~utils'

export const port = ports['ssr-vue']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
if (isBuild) {
// build first
const { build } = await import('vite')
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-webworker/__tests__/serve.ts
Expand Up @@ -7,7 +7,7 @@ import { isBuild, ports, rootDir } from '~utils'

export const port = ports['ssr-webworker']

export async function serve() {
export async function serve(): Promise<{ close(): Promise<void> }> {
await kill(port)

// we build first, regardless of whether it's prod/build mode
Expand Down

0 comments on commit 5161ecd

Please sign in to comment.