Skip to content

Title: Absolute path doesn't work with test files #8

@EngenMe

Description

@EngenMe

Description

When using absolute paths in test files, such as:

import AuthRoute from '@routes/auth.route';

The test file shows error because the absolute path is not recognized. This is likely due to the exclusion of the src/tests folder in the tsconfig.json configuration.

image

Suggested Solution:

To fix this issue, simply modify the tsconfig.json file to exclude the tests directory instead of src/tests.

Change this line in tsconfig.json:

"exclude": ["node_modules", "src/http", "src/logs", "src/tests"]

To:

"exclude": ["node_modules", "src/http", "src/logs"]

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