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

fix: new Date() such that it works with MockDate library #688

Merged

Conversation

uulwake
Copy link
Contributor

@uulwake uulwake commented Jun 28, 2022

Getting this error when running test coverage

TypeError: Class constructor MockDate cannot be invoked without 'new'
 ❯ new HtmlReport ../../node_modules/.pnpm/istanbul-reports@3.1.4/node_modules/istanbul-reports/lib/html/index.js:265:21
 ❯ Object.create ../../node_modules/.pnpm/istanbul-reports@3.1.4/node_modules/istanbul-reports/index.js:22:16

@uulwake uulwake changed the title FIx Class constructor MockDate cannot be invoked without 'new' error… Fix Class constructor MockDate cannot be invoked without 'new' error Jun 28, 2022
packages/istanbul-reports/lib/html/index.js Outdated Show resolved Hide resolved
@uulwake
Copy link
Contributor Author

uulwake commented Jul 12, 2022

Please check again @bcoe . Thank you.

@bcoe bcoe changed the title Fix Class constructor MockDate cannot be invoked without 'new' error fix: new Date() such that it works with MockDate library Jul 13, 2022
@bcoe bcoe merged commit 85905f9 into istanbuljs:master Jul 13, 2022
@bcoe
Copy link
Member

bcoe commented Jul 13, 2022

@uulwake thank you for the contribution.

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

Successfully merging this pull request may close these issues.

None yet

2 participants