I was able to build and run the 21 solution. I then downgraded react and all dependencies to match the solution, did a build and now the tests will run but the App.test.js fails with a network error.
“dependencies”: {
“@testing-library/jest-dom”: “^5.16.5”,
“@testing-library/react”: “^13.4.0”,
“@testing-library/user-event”: “^14.2.0”,
“axios”: “^0.27.2”,
“eslint-config-airbnb”: “^19.0.4”,
“http-proxy-middleware”: “^2.0.1”,
“msw”: “^0.47.4”,
“prop-types”: “^15.7.2”,
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”,
“react-number-format”: “^5.4.2”,
“react-router-dom”: “^6.2.1”,
“react-scripts”: “5.0.1”,
“react-select”: “^5.8.3”,
“web-vitals”: “^2.1.4”
},
Its as if the setupServer isnt working, or the handlers arent working as intended.
AxiosError {
message: ‘Network Error’,
name: ‘AxiosError’,
code: ‘ERR_NETWORK’,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: xhrAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function] },
validateStatus: [Function: validateStatus],
headers: { Accept: ‘application/json, text/plain, /’ },
method: ‘get’,
url: ‘/api/auth/current-user’,
data: undefined
},
request: XMLHttpRequestOverride {
_events: ,
log: [Function: debug] {
namespace: ‘xhr:request GET /api/auth/current-user’,
useColors: false,
color: 179,
extend: [Function: extend],
destroy: [Function: deprecated],
enabled: [Getter/Setter],
inspectOpts: {},
log: undefined
},
UNSENT: 0,
OPENED: 1,
HEADERS_RECEIVED: 2,
LOADING: 3,
DONE: 4,
onreadystatechange: null,
onabort: [Function: handleAbort],
onerror: [Function: handleError],
onload: null,
onloadend: [Function: onloadend],
onloadstart: null,
onprogress: null,
ontimeout: [Function: handleTimeout],
url: ‘/api/auth/current-user’,
method: ‘GET’,
readyState: 0,
withCredentials: false,
status: 200,
statusText: ‘OK’,
response: null,
responseType: ‘text’,
responseText: null,
responseXML: null,
responseURL: ‘’,
upload: {},
timeout: 0,
_requestHeaders: HeadersPolyfill1 {
[Symbol(normalizedHeaders)]: [Object],
[Symbol(rawHeaderNames)]: [Map]
},
_responseHeaders: HeadersPolyfill1 {
[Symbol(normalizedHeaders)]: {},
[Symbol(rawHeaderNames)]: Map(0) {}
},
async: true,
user: undefined,
password: undefined,
data: undefined
},
response: XMLHttpRequestOverride {
_events: ,
log: [Function: debug] {
namespace: ‘xhr:request GET /api/auth/current-user’,
useColors: false,
color: 179,
extend: [Function: extend],
destroy: [Function: deprecated],
enabled: [Getter/Setter],
inspectOpts: {},
log: undefined
},
UNSENT: 0,
OPENED: 1,
HEADERS_RECEIVED: 2,
LOADING: 3,
DONE: 4,
onreadystatechange: null,
onabort: [Function: handleAbort],
onerror: [Function: handleError],
onload: null,
onloadend: [Function: onloadend],
onloadstart: null,
onprogress: null,
ontimeout: [Function: handleTimeout],
url: ‘/api/auth/current-user’,
method: ‘GET’,
readyState: 0,
withCredentials: false,
status: 200,
statusText: ‘OK’,
response: null,
responseType: ‘text’,
responseText: null,
responseXML: null,
responseURL: ‘’,
upload: {},
timeout: 0,
_requestHeaders: HeadersPolyfill1 {
[Symbol(normalizedHeaders)]: [Object],
[Symbol(rawHeaderNames)]: [Map]
},
_responseHeaders: HeadersPolyfill1 {
[Symbol(normalizedHeaders)]: {},
[Symbol(rawHeaderNames)]: Map(0) {}
},
async: true,
user: undefined,
password: undefined,
data: undefined
}
}