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

getting the following error #118

Closed
amrsa1 opened this issue Mar 31, 2021 · 3 comments
Closed

getting the following error #118

amrsa1 opened this issue Mar 31, 2021 · 3 comments

Comments

@amrsa1
Copy link

amrsa1 commented Mar 31, 2021

im getting the following error after executing the test and jest reporter is not generating the report

internal/fs/utils.js:779
  throw new ERR_INVALID_ARG_TYPE(
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of XMLElement
    at Object.writeFile (fs.js:1436:5)
    at /home/amrka/Desktop/__tests__/node_modules/jest-html-reporter/dist/main.js:47:13
    at /home/amrka/Desktop/__tests__/node_modules/mkdirp/index.js:30:20
    at FSReqCallback.oncomplete (fs.js:171:23) {
  code: 'ERR_INVALID_ARG_TYPE'
}
@Hargne
Copy link
Owner

Hargne commented May 13, 2021

Hi,

Is it possible to see the jest config?

@mickog
Copy link

mickog commented Jun 2, 2021

I am seeing this same issue @Hargne

jest config

module.exports = {
  preset: 'ts-jest',
  reporters: ["default",
    ["jest-junit", { outputDirectory: "test-reports/" }],
    ["./node_modules/jest-html-reporter", {
      "pageTitle": "CDK Test Report",
      "includeFailureMsg": true,
      "includeConsoleLog": true
    }]],
  testEnvironment: 'node',
  coveragePathIgnorePatterns: [
    "__tests__/util",
  ],
  testPathIgnorePatterns: [
    "__tests__/util",
  ],
  coverageDirectory: "test-reports/",
};

@mickog
Copy link

mickog commented Jun 2, 2021

I can confirm downgrading my node version from v14.16.1 to v12.16.1 resolved the issue. Possibility issue is caused by this nodejs/node#31030

@Hargne Hargne closed this as completed May 30, 2022
ptabor pushed a commit to ptabor/jest-html-reporter that referenced this issue Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants