Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task can't find configuration file when it is in a different folder #6

Open
IzGiulio opened this issue Oct 7, 2021 · 0 comments
Open

Comments

@IzGiulio
Copy link

IzGiulio commented Oct 7, 2021

I'm using cypress-postgres together with Quasar.
I want to have different configuration files in different folders but, when I try to run the tests, it says:

cy.task('dbQuery') failed with the following error:

Cannot find module '/../cypress.json'
Require stack:
- /.../node_modules/cypress-postgres/cypress/plugins/index.js
- /.../test/cypress/plugins/index.ts 

This is what I have inside my plugins/index.ts

const pluginConfig: Cypress.PluginConfig = (on, config) => {
    on('task', {
        dbQuery: (query) => {
            require('cypress-postgres')(query.query, query.connection)
        }
    })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant