# Discourse autospec and JavaScript tests

**URL:** https://meta.discourse.org/t/discourse-autospec-and-javascript-tests/61908
**Category:** Development
**Created:** [May 1, 2017, 3:59pm UTC](https://meta.discourse.org/t/discourse-autospec-and-javascript-tests/61908 "2017-05-01T15:59:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 1, 2017, 3:59pm UTC](https://meta.discourse.org/t/discourse-autospec-and-javascript-tests/61908/1 "2017-05-01T15:59:27Z")

</div>

I just did a little round of work on our JavaScript integration with `bin/rake autospec`

[https://asciinema.org/a/118485](https://asciinema.org/a/118485)

In particular this takes care of:

- Rerunning current failing JS test on source code change
- Attempts to automatically figure out the module it needs to run based on file name
- Re-focus on another failing JS test on save

The workflow is almost the same as the workflow for Ruby tests, still need a bit more polish but it is very cool.
