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

Cannot Import from bcryptjs in a Playwright Test #153

Closed
ITenthusiasm opened this issue Feb 26, 2024 · 1 comment
Closed

Cannot Import from bcryptjs in a Playwright Test #153

ITenthusiasm opened this issue Feb 26, 2024 · 1 comment

Comments

@ITenthusiasm
Copy link

Currently, I'm working on a project that's using Playwright for its end-to-end tests. We're using bcryptjs for hashing passwords in our application, but we aren't able to do this from within a Playwright test. This seems to be because bcryptjs doesn't support ESM. Is there any plan for ESM to be supported? Is there a timeline for this?

(For clarity on why we're using bcryptjs within Playwright: When we create an example user for a test, we have to hash the password because the application code is going to decrypt it.)

@ITenthusiasm
Copy link
Author

So although this was a module issue, it was related to how I was importing from bcryptjs in my ESM application. Specifically, I couldn't do named imports. Doing a default import works fine. That said, it would still be great if this package supported ESM -- especially since things are going that way moving forward.

For historical purposes, I'm going to retitle this issue and close it so that people don't get confused and think that ESM Support was added (or rejected).

@ITenthusiasm ITenthusiasm changed the title ESM Support Cannot Import from bcryptjs in a Playwright Test Feb 28, 2024
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