Commit a50a0577 authored by Joe Haddad's avatar Joe Haddad Committed by JJ Kasper

Fix Tests (#9963)

parent 5a2182e6
......@@ -86,8 +86,8 @@
"postcss-trolling": "0.1.7",
"pre-commit": "1.2.2",
"prettier": "1.19.1",
"react": "16.10.2",
"react-dom": "16.10.2",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-ssr-prepass": "1.0.8",
"release": "6.0.1",
"request-promise-core": "1.1.2",
......@@ -100,11 +100,13 @@
"tree-kill": "1.2.1",
"typescript": "3.7.3",
"wait-port": "0.2.2",
"webpack-bundle-analyzer": "3.3.2"
"webpack-bundle-analyzer": "3.3.2",
"browserslist": "^4.8.3",
"caniuse-lite": "^1.0.30001019"
},
"resolutions": {
"browserslist": "^4.7.1",
"caniuse-lite": "^1.0.30001002"
"browserslist": "^4.8.3",
"caniuse-lite": "^1.0.30001019"
},
"engines": {
"node": ">= 8.0.0"
......
......@@ -2,7 +2,7 @@ import { getRouteRegex } from './route-regex'
export function getRouteMatcher(routeRegex: ReturnType<typeof getRouteRegex>) {
const { re, groups } = routeRegex
return (pathname: string | undefined) => {
return (pathname: string | null | undefined) => {
const routeMatch = re.exec(pathname!)
if (!routeMatch) {
return false
......
......@@ -11,7 +11,7 @@ export default (customRoute = false) => {
decode: decodeParam,
})
return (pathname: string | undefined, params?: any) => {
return (pathname: string | null | undefined, params?: any) => {
const res = pathname == null ? false : matcher(pathname)
if (!res) {
return false
......
......@@ -6,7 +6,7 @@ export const route = pathMatch()
export type Params = { [param: string]: any }
export type RouteMatch = (pathname: string | undefined) => false | Params
export type RouteMatch = (pathname: string | null | undefined) => false | Params
type RouteResult = {
finished: boolean
......
......@@ -171,8 +171,8 @@
"@types/mkdirp": "0.5.2",
"@types/nanoid": "2.0.0",
"@types/node-fetch": "2.3.4",
"@types/react": "16.8.18",
"@types/react-dom": "16.9.3",
"@types/react": "16.9.17",
"@types/react-dom": "16.9.4",
"@types/react-is": "16.7.1",
"@types/resolve": "0.0.8",
"@types/send": "0.14.4",
......
......@@ -101,7 +101,7 @@ describe('Production response size', () => {
)
// These numbers are without gzip compression!
const delta = responseSizeKilobytes - 198
const delta = responseSizeKilobytes - 196
expect(delta).toBeLessThanOrEqual(0) // don't increase size
expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target
})
......
This diff is collapsed.
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