Skip to content

Commit

Permalink
testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
muriukialex committed Feb 16, 2024
1 parent 53228a8 commit 28974cb
Show file tree
Hide file tree
Showing 3 changed files with 658 additions and 1 deletion.
16 changes: 15 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import { defineConfig } from "cypress"
import jsonServer from "json-server"

export default defineConfig({
e2e: {
baseUrl: "http://localhost:3000",
chromeWebSecurity: false,
setupNodeEvents(on, config) {
// implement node event listeners here
on("before:run", () => {
const server = jsonServer.create()
const router = jsonServer.router(
"cypress/fixtures/empty-user-labs.json",
)
const middlewares = jsonServer.defaults()

server.use(middlewares)
server.use(router)

server.listen(3000, () => {
console.log("JSON Server is running")
})
})
},
},
})
Loading

0 comments on commit 28974cb

Please sign in to comment.