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

Failing existing test when importing Q in cozy-konnector-libs #1255

Open
LucsT opened this issue Oct 21, 2022 · 0 comments
Open

Failing existing test when importing Q in cozy-konnector-libs #1255

LucsT opened this issue Oct 21, 2022 · 0 comments

Comments

@LucsT
Copy link
Contributor

LucsT commented Oct 21, 2022

When using cozy-client 33.2.0 (was not present in 29.1.2, huge upgrade)

If we import Q the normal way "const { Q } = require('cozy-client')", one test is failing a weird way. This test was a success in 29.1.2.
https://app.travis-ci.com/github/konnectors/libs/jobs/585325959#L456

FAIL packages/cozy-konnector-libs/src/libs/BaseKonnector.spec.js

  ● Test suite failed to run

    TypeError: The "original" argument must be of type function. Received undefined

      at Object.<anonymous> (node_modules/open/index.js:9:17)

      at Object.<anonymous> (node_modules/cozy-client/dist/cli/index.js:18:36)

One workaround was found defining Q directly by his path "const { Q } = require('cozy-client/dist/queries/dsl')"

In this case a BaseKonnector test was failling but the Q import was in saveIdentity.js, that was in import in BaseKonnector.js
See this commit for more info
konnectors/libs@7041229

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