Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MarvDann opened this issue Aug 21, 2018 · 1 comment
Closed

Comments

@MarvDann
Copy link

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....

  • clone the realworld app from https://github.com/dojo/examples.git
  • install npm dependencies
  • run dojo build -m test
  • create a file in root called intern.json
  • add the following content to intern.json
{
	"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
@agubler
Copy link
Member

agubler commented Aug 21, 2018

@MarvDann Just for future reference, you shouldn't need to create an intern configuration you should be able to run the unit tests using:

http://localhost:[PORT]/node_modules/intern/?config=node_modules/@dojo/cli-test-intern/intern/intern.json@local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants