Skip to content

Commit

Permalink
add unit test case for next.rs api (#53679)
Browse files Browse the repository at this point in the history
### What?

unit test for next.rs api

### Why?

ensure that it's working

### How?
  • Loading branch information
sokra authored Aug 7, 2023
1 parent 7ec76eb commit 654bd8c
Show file tree
Hide file tree
Showing 3 changed files with 1,078 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/next/src/build/swc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ interface TurboEngineOptions {
memoryLimit?: number
}

interface Issue {
export interface Issue {
severity: string
category: string
filePath: string
Expand All @@ -449,7 +449,7 @@ interface Issue {
subIssues: Issue[]
}

interface Diagnostics {}
export interface Diagnostics {}

export type TurbopackResult<T = {}> = T & {
issues: Issue[]
Expand All @@ -462,19 +462,19 @@ interface Middleware {
matcher?: string[]
}

interface Entrypoints {
export interface Entrypoints {
routes: Map<string, Route>
middleware?: Middleware
pagesDocumentEndpoint: Endpoint
pagesAppEndpoint: Endpoint
pagesErrorEndpoint: Endpoint
}

interface Update {
export interface Update {
update: unknown
}

interface Project {
export interface Project {
update(options: ProjectOptions): Promise<void>
entrypointsSubscribe(): AsyncIterableIterator<TurbopackResult<Entrypoints>>
hmrEvents(identifier: string): AsyncIterableIterator<TurbopackResult<Update>>
Expand Down
Loading

0 comments on commit 654bd8c

Please sign in to comment.