Files
buuh/scripts/test
T
Yoshua Wuyts a7916ec3f9 [major] choo v4 (#352)
* location: change url on location:setLocation

- [ ] don't break hashing
- [ ] allow not changing the url

fixup! move fns around

fixup! add search string

* app.start: clean

* walk: add

* location: update arg calls

* fixup! location: update

* uri-wrap: fix thunking

* router: update to latest sheet-router (#239)

* router: update to latest sheet-router

* tests: fix for latest version

* tests: fix SSR

* tests: fix history

* tests: spruce up

* docs: update example

* examples: update

* deps: bump sheet-router

* 4.0.0-0

* chore(changelog): 4.0.0 (#211)

* feat(api:) arg order (#268)

* s/data, state/state, data/

* feat(api): swap arguments

* fix(href): fix routing (#271)

* feat(http): remove (#269)

* feat(router): enable hash routing (#273)

* deps: fix mount

* 4.0.0-1

* feat(mount): copy {script,link} tags

* 4.0.0-2

* fix(mount): forEach -> for

Lol can't use forEach

* fix(router): use state.location.href (#282)

* fix(mount): use deep node clone

* 4.0.0-3

* fix(deps): remove hash-match

* 4.0.0-4

* fix(mount): return node

* 4.0.0-5

* fix(router): check if a hash is a valid selector (#339)

* 4.0.0-6

* fix(router): pass params on newstate (#343)

* 4.0.0-7

* feat(docs): update for 4.0.0 (#320)

* feat(docs): update for 4.0.0

* docs: update router example in readme (#337)

* chore(changelog): update for v4 (#351)
2016-12-11 19:35:29 +01:00

79 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# setting exit because we're linting and need to exit on failure
set -e
usage () {
printf "Usage: test\n"
}
lint () {
standard > /dev/tty
standard-markdown > /dev/tty
}
test_electron () {
check_deps
lint
browserify tests/**/*.js \
-t es2020 \
-p proxyquire-universal \
| tape-run
}
test_cov () {
check_deps
lint
browserify tests/**/*.js \
-t es2020 \
-p proxyquire-universal \
-p tape-istanbul/plugin \
| tape-run \
| tape-istanbul \
&& istanbul report
}
test_server () {
lint
standard
check_deps
NODE_ENV=test node tests/server/*
}
test_browser () {
NODE_ENV=test zuul tests/browser/*
}
test_browser_local () {
lint
check_deps
NODE_ENV=test zuul --local 8080 -- tests/browser/*
}
check_deps () {
dependency-check . --entry 'index.js'
dependency-check . --entry 'index.js' --extra --no-dev \
-i document-ready \
-i global
}
# set CLI flags
# parse CLI flags
while true; do
case "$1" in
-h|--help) usage && exit 1 ;;
-- ) shift; break ;;
* ) break ;;
esac
done
case "$1" in
e|electron) shift; test_electron "$@";;
b|browser) shift; test_browser "$@";;
l|browser-local) shift; test_browser_local "$@";;
s|server) shift; test_server "$@";;
lint) shift; lint "$@";;
c|cov) shift; test_cov "$@";;
d|deps) shift; check_deps "$@";;
esac