Skip to content

Commit

Permalink
chore: try ts-ignore jest
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jan 20, 2023
1 parent bd57f4a commit 5ce82e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/vite/src/node/ssr/ssrModuleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ async function nodeImport(
importer,
// Non-external modules can import ESM-only modules, but only outside
// of test runs, because we use Node `require` in Jest to avoid segfault.
// @ts-expect-error jest only exists when running Jest
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore jest only exists when running Jest
typeof jest === 'undefined'
? { ...resolveOptions, tryEsmOnly: true }
: resolveOptions,
Expand Down
3 changes: 2 additions & 1 deletion packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,8 @@ export const multilineCommentsRE = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g
export const singlelineCommentsRE = /\/\/.*/g
export const requestQuerySplitRE = /\?(?!.*[/|}])/

// @ts-expect-error jest only exists when running Jest
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore jest only exists when running Jest
export const usingDynamicImport = typeof jest === 'undefined'

/**
Expand Down

0 comments on commit 5ce82e2

Please sign in to comment.