jotty-mcclure / cypress-attest

An integration of Worldspace Attest for the Cypress testing tool
MIT License
2 stars 1 forks source link

cypress-attest errors out due to dynamic path #9

Closed vanderhoop closed 4 years ago

vanderhoop commented 4 years ago

Hey @joshuamcclure, Our repository leverages workspaces, and running tests within our e2e workspace causes the following error with the current master version of cypress-attest:

CypressError: cy.exec('node .///attest.js') failed because the command exited with a non-zero code.
Pass {failOnNonZeroExit: false} to ignore exit code failures.

Information about the failure:
Code: 1

Stderr:
internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module '/Users/travis.vanderhoop/dev/jupiter/cypress_e2e/account_app/attest.js'
    at Function.Module._resolveFilename (inte...

We tracked the issue down to this line, and were able to get the test suite to blend by replacing node ./${__dirname}/attest.js with node [ABSOLUTE_PATH_TO_ATTEST.JS], but that was just a hack to help us evaluate the enterprise tooling.

While we could execute the e2e tests from our project root rather than from the dedicated workspace (we have a large monorepo), this would be a change to our entire repository to accommodate this issue.

joshuamcclure commented 4 years ago

@vanderhoop to be clear, are you referring to yarn's workspaces feature?