Skip to content

Source maps blank for src folder when running intern tests in browser  #138

@MarvDann

Description

@MarvDann

When trying to debug unit tests I am unable to see any source maps for all code in the /src folder.
I can see source maps for the unit tests themselves and can set a breakpoint in a unit test but I can't step through the source code.

To reproduce the error....

{
	"environments": [ { "browserName": "chrome" } ],
	"suites": [ "output/test/unit.js" ]
}

-install a http server npm i http-server -g

  • serve the root of the project by running http-server (Listens on port 8080 by default)
  • In a browser navigate to localhost:8080/node_modules/intern/
  • When your tests load open chrome developer tools (F12 or Ctrl + Shift + I)
  • Navigate to the sources tab in chrome dev tools
  • Navigate to
   webpack://./src/widgets/Tags.ts
  • observe blank source map containing
null


// WEBPACK FOOTER //
// ./src/widgets/Tags.ts

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