dojo / cli-test-intern

:rocket: Dojo - cli command for testing applications
http://dojo.io
Other
2 stars 19 forks source link

Refreshing browser when viewing Intern test results does not rerun "dojo test". #63

Closed rmaccracken closed 6 years ago

rmaccracken commented 6 years ago

Enhancement

Refreshing the page when viewing the intern test results does not re-run the tests, but instead shows the results from the last run of "dojo test". When using Intern on our existing Dojo (1) codebase, the tests will be rerun based on the latest code changes.

Package Version: I was just testing out the first Dojo 2 tutorial (Dojo 2 local installation). "dojo test" is not mentioned in the tutorial, but is mentioned from the README file.

Code

Expected behavior: I would expect navigating to the test results (http://localhost:9999/node_modules/intern/client.html?config=node_modules/@dojo/cli-test-intern/intern/intern-local), or refreshing the browser, would rerun "dojo test" to output the latest results.

Actual behavior: I first run "dojo test" from the CMD window and all tests pass. In the results, it mentions you can view the results in the browser using a URL. That URL is incorrect (at the end it references "/intern" rather than something like "/intern-local"). I looked in the filesystem to find four files with "intern-*", so I chose one.

I then change the source code to make the test fail and then refresh the browser. The page reports that all tests still pass. Only after re-running "dojo test" and then refreshing the browser does the browser show the tests failing.

kitsonk commented 6 years ago

From @matt-gadd:

I don’t think we should implement this yet (once we have a new build, we can implement watch in cli-test-intern)

agubler commented 6 years ago

This is now possible using the new build command @dojo/cli-build-app when building the tests in watch mode.

dojo build app --mode test --watch