Unverified Commit ed6cd410 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Ensure test-unit includes package unit tests (#46707)

Seems the unit tests from our packages haven't been running as a few haven't been updated and had failing assertions. 
parent 4e544293
......@@ -13,7 +13,7 @@
"lerna": "lerna",
"dev": "turbo run dev --parallel",
"test-types": "tsc",
"test-unit": "jest test/unit/",
"test-unit": "jest test/unit/ packages/next/ packages/font",
"test-dev": "cross-env NEXT_TEST_MODE=dev pnpm testheadless",
"test-start": "cross-env NEXT_TEST_MODE=start pnpm testheadless",
"test-deploy": "cross-env NEXT_TEST_MODE=deploy pnpm testheadless",
......
......@@ -931,9 +931,9 @@ describe('navigateReducer', () => {
],
},
// TODO-APP: optimistic tree is wrong
// undefined,
// undefined,
// true,
undefined,
undefined,
true,
],
}
......
......@@ -65,7 +65,13 @@ describe('RouteHandlerManager', () => {
}
expect(await handlers.handle(route, req, res)).toEqual(true)
expect(handler.handle).toHaveBeenCalledWith(route, req, res)
expect(handler.handle).toHaveBeenCalledWith(
route,
req,
res,
undefined,
undefined
)
})
it('will throw when multiple handlers are added for the same type', () => {
......@@ -95,7 +101,13 @@ describe('RouteHandlerManager', () => {
}
expect(await handlers.handle(route, req, res)).toEqual(true)
expect(goodHandler.handle).toBeCalledWith(route, req, res)
expect(goodHandler.handle).toBeCalledWith(
route,
req,
res,
undefined,
undefined
)
expect(badHandler.handle).not.toBeCalled()
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment