-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53228a8
commit 28974cb
Showing
3 changed files
with
658 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
}) | ||
}) | ||
}, | ||
}, | ||
}) |
Oops, something went wrong.