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

Issue running dayjs in Jest test #1669

Open
LukasDeco opened this issue Oct 19, 2021 · 1 comment
Open

Issue running dayjs in Jest test #1669

LukasDeco opened this issue Oct 19, 2021 · 1 comment

Comments

@LukasDeco
Copy link

Describe the bug
I use rescript which compiles to js. It compiles imports like this:
import * as Dayjs from "dayjs";

As a result, my component using dayjs is untestable. When it runs in jest it errors: with

TypeError: t is not a function
``

**Expected behavior**
Be able to compile rescript and run tests easy!

**Information**
 - Day.js Version ^1.10.7
 - OS: Windows
 - Browser: N/A node unit test
 - Time zone: EST
@enriqueMota
Copy link

did you solve this?

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

2 participants