First, we need to run a Selenium Hub and a Firefox Selenium node:
$ docker run -d --name hub -p 4444:4444 selenium/hub
$ docker run -d --name fx --link hub:hub selenium/node-firefox
const http = require('http'); | |
const server = http.createServer(); | |
server.on('request', (request, response) => { | |
let body = []; | |
request.on('data', (chunk) => { | |
body.push(chunk); | |
}).on('end', () => { | |
body = Buffer.concat(body).toString(); |
Skip this:
brew tap homebrew/dupes
brew tap homebrew/versions
As:
Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
#!/bin/bash | |
command -v fswatch >/dev/null 2>&1 || { echo >&2 "fswatch is not installed. To install it use 'brew install fswatch'. Aborting."; exit 1; } | |
command -v mix >/dev/null 2>&1 || { echo >&2 "mix is not installed. Aborting."; exit 1; } | |
PROJECT_PATH=$(git rev-parse --show-toplevel) | |
[[ "$?" != "0" ]] && echo "Stale test watch works only within git project." && exit 1; | |
declare -a IGNORED_PATHS | |
declare -i throttle_by=2 |
# You will need fswatch installed (available in homebrew and friends) | |
# The command below will run tests and wait until fswatch writes something. | |
# The --stale flag will only run stale entries, it requires Elixir v1.3. | |
# fswatch lib/ test/ | mix test --stale --listen-on-stdin | |
fswatch -0 --latency=0.01 --one-per-batch lib test | mix test --stale test/ |