Skip to content

Commit

Permalink
starts TeselaGen#91 + extra docs + allow logging in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Jul 15, 2024
1 parent 023b552 commit 5b02d7f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,23 @@ Or
Nx: run-many
publish
Execute: nx run-many --target=publish

## Other

### Running OVE unit tests

In addition to cypress e2e tests, there are a few unit tests in OVE. To run them:

- You must start the dev server, even if the tests don't load the page.
- You have to be in the directory `packages/ove`

```bash
# Run the dev server (you can do this from any directory)
yarn nx run ove:start

# Move the package directory
cd packages/ove

# Run the unit test
yarn cypress run --spec cypress/e2e/unit/getStructuredBases.spec.js
```
26 changes: 17 additions & 9 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,23 @@ export default ({
runMode: 3,
openMode: 0
},
// setupNodeEvents(on, config) {
// on(
// "file:preprocessor",
// vitePreprocessor({
// // configFile: "./vite.config.js",
// configFile: path.resolve(__dirname, "./vite.config.js"),
// mode: "development"
// })
// );
// Allow logging in the Cypress test runner
// calling cy.task('log', 'message') will log the message to the console
setupNodeEvents(on, config) {
on("task", {
log(message) {
console.log(message);
return null;
}
});
// on(
// "file:preprocessor",
// vitePreprocessor({
// // configFile: "./vite.config.js",
// configFile: path.resolve(__dirname, "./vite.config.js"),
// mode: "development"
// })
},

// // return require("./cypress/plugins/index.js")(on, config);
// },
Expand Down

0 comments on commit 5b02d7f

Please sign in to comment.