karma-runner / karma-runner/karma

Document usePolling option in karma.config.js

Open
#2,074 2 comments 0 reactions 0 assignees View on GitHub
help wanted type: docs
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Expected behavior

Seeing all available options that materially affect the test harness [here](http://karma-runner.github.io/0.13/config/configuration-file.html)
### Actual behavior

I don't see `usePolling`; which solves the problem of [auto-watching mounted source files in Docker containers](https://github.com/docker/docker/issues/18246); cf. this [SO thread](http://stackoverflow.com/questions/28681491/within-docker-vm-gulp-watch-seems-to-not-work-well-on-volumes-hosted-from-the-h).
### Enviroment Details
- Karma version (output of `karma --version`): 0.13.9
- Relevant part of your `karma.config.js` file

``` javascript
...
// won't work in a Docker container
autoWatch: true,

autoWatchBatchDelay: 1000,

usePolling: true,
...
```

This makes it work with the following output from `docker-compose logs`, e.g.

![image](https://cloud.githubusercontent.com/assets/2729079/14874528/3d71b708-0cb6-11e6-8487-64522dd99743.png)

![image](https://cloud.githubusercontent.com/assets/2729079/14874532/4bacf422-0cb6-11e6-9bd7-405780031fab.png)

Contributor guide

Open the contributing guide

Research direction

Start with the documented configuration options linked in the issue and inspect the repository's karma.config.js references to understand how usePolling is presented. Add usePolling to the configuration documentation, including its Docker file-watching use case, and verify that the option appears alongside the other test-harness settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.