Skip to content

Commit 1445c26

Browse files
committed
chore: move tests to resolve edge clash
1 parent 6ef27a5 commit 1445c26

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
"testMatch": [
101101
"**/test/**/*.spec.js",
102102
"**/test/**/*.spec.ts",
103-
"**/*.test.ts",
104103
"!**/test/e2e/**",
105104
"!**/test/fixtures/**",
106105
"!**/test/sample/**",

packages/runtime/src/templates/handlerUtils.test.ts renamed to test/handlerUtils.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { normalizeRoute, unlocalizeRoute, localizeRoute, localizeDataRoute } from './handlerUtils'
1+
import {
2+
normalizeRoute,
3+
unlocalizeRoute,
4+
localizeRoute,
5+
localizeDataRoute,
6+
} from '../packages/runtime/src/templates/handlerUtils'
27

38
describe('normalizeRoute', () => {
49
it('removes a trailing slash from a route', () => {

packages/runtime/src/templates/server.test.ts renamed to test/server.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { mockRequest } from 'next/dist/server/lib/mock-request'
22
import { Options } from 'next/dist/server/next-server'
33

4-
import { getNextServer, NextServerType, netlifyApiFetch } from './handlerUtils'
5-
import { NetlifyNextServer, NetlifyConfig } from './server'
4+
import { getNextServer, NextServerType, netlifyApiFetch } from '../packages/runtime/src/templates/handlerUtils'
5+
import { NetlifyNextServer, NetlifyConfig } from '../packages/runtime/src/templates/server'
66

7-
jest.mock('./handlerUtils', () => {
8-
const originalModule = jest.requireActual('./handlerUtils')
7+
jest.mock('../packages/runtime/src/templates/handlerUtils', () => {
8+
const originalModule = jest.requireActual('../packages/runtime/src/templates/handlerUtils')
99

1010
return {
1111
__esModule: true,

0 commit comments

Comments
 (0)