forked from ng-book/angular2-redux-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.test.bats
executable file
·42 lines (36 loc) · 897 Bytes
/
.test.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bats
DIR=$(dirname $BATS_TEST_FILENAME)
load "${NGBOOK_ROOT}/scripts/bats/fullstack.bats"
load "${NGBOOK_ROOT}/scripts/bats-support/load.bash"
load "${NGBOOK_ROOT}/scripts/bats-assert/load.bash"
# @test "angular-redux-chat unit tests pass" {
# cd $DIR
# run ng test --single-run
# assert_output --partial 'SUCCESS'
# }
@test "angular-redux-chat e2e tests pass" {
cd $DIR
run_ng_e2e $TEST_TMP_DIR
run cat ${TEST_TMP_DIR}/log.txt
assert_output --partial 'SUCCESS'
}
@test "angular-redux-chat linting passes" {
cd $DIR
run npm run lint
assert_output --partial 'All files pass linting'
}
setup() {
echo "travis_fold:start:angular-redux-chat"
cd $DIR
TEST_TMP_DIR="$(mktemp -d -t fullstackXXX)"
kill_ng_cli || :
kill_by_port 4200
true
}
teardown() {
cd $DIR
kill_ng_cli || :
kill_by_port 4200
echo "travis_fold:end:angular-redux-chat"
true
}