Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Feb 6, 2025
1 parent 58e3655 commit 1283947
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/server/lib/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@ export const createCommonRoutes = ({
next()
})

getCtx().coreData.studio?.initializeRoutes(router)
if (!getCtx().coreData.studio) {
// Return a blank file when studio is undefined
router.get('/__cypress-studio/app-studio.js', (req, res) => {
res.setHeader('Content-Type', 'application/javascript')
res.status(200).send('')
})
} else {
getCtx().coreData.studio?.initializeRoutes(router)
}

router.get(`/${config.namespace}/tests`, (req, res, next) => {
// slice out the cache buster
Expand Down

0 comments on commit 1283947

Please sign in to comment.