Skip to content

Warning message running npm test #9

@jtlapp

Description

@jtlapp

Using this template unmodified, I get this message running npm test:

ts-jest[config] (WARN) message TS151001: If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.

With this dummy test file:

import * as path from 'path'

test("dummy test", () => {
  expect(path.join("xyz", "pdq")).toEqual("xyz/pdq")
})

The message remains no matter in which tsconfig.json I put the following lines:

  "allowSyntheticDefaultImports": true,
  "esModuleInterop": true,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions