Skip to content

Problem with Jest #11

@desoss

Description

@desoss

I cannot make my unit tests work.

I get this error:

Jest encountered an unexpected token

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

If I remove the lines of code that exploit dnum the tests work perfectly.

This is my jest.config.js:

module.exports = {
    preset: 'ts-jest',
    testEnvironment: 'node',
    roots: ["<rootDir>/src"],
    testMatch: ['**/*.test.(ts|tsx)'],
};

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