Skip to content

Web Test Runner TypeError: Failed to fetch dynamically imported module #2869

Open
@Tharunkumararela

Description

@Tharunkumararela

Using Angular CLI 17.3.7 version

Steps

Inside the package.json file
"scripts":{
"test:wt": "web-test-runner --config  projects/project1/web-test-runner.config.mjs"

}

Install "@web/test-runner": "0.18.0"

web-test-runner.config.mjs Code
export default{
files:' projects/project1/src/**/*.spec.ts',
nodeResolve:true
};

While running inside the terminal by this command npm run test:wt getting error below.

Browser logs:
TypeError: Failed to fetch dynamically imported module:http://localhost:8000/src/app/test.spec.ts
Could not import your test module . Check the browser logs or open the browser in debug mode
Error while running tests.

I can not get web-test-runner to get work and I am not sure where the fault lies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions