Skip to content

Commit

Permalink
tests: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SharzyL committed Mar 10, 2024
1 parent 08fdc69 commit e905dcf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev --var BASE_URL:http://localhost:8787"
"dev": "wrangler dev --var BASE_URL:http://localhost:8787 --port 8787"
},
"author": "SharzyL <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions test/integration.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// it is working-in-progress and not ready to be used

import fs from "fs"
import path from "path"
import assert from "assert"
Expand Down
2 changes: 0 additions & 2 deletions test/test.env

This file was deleted.

12 changes: 7 additions & 5 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ localaddr="http://localhost:8787"
tmp_file=$(mktemp)
trap 'rm "$tmp_file"' EXIT

die() {
echo "$@" >&2
exit 1
}

# declare colors
C_RESET='\x1b[0m'
C_RED='\x1b[0;37;31m'
C_GREEN='\x1b[0;37;32m'

die() {
printf "${C_RED}%s${C_RESET}\n" "$@" >&2
exit 1
}

err() {
printf "${C_RED}%s${C_RESET}\n" "$@"
}
Expand Down Expand Up @@ -286,6 +286,8 @@ _test_suggest() {
it 'should suggest .jpg url' grep -q '"suggestUrl": .*\.jpg' "$tmp_file"
}

pgrep -f workerd > /dev/null || die "no workerd is running, please start one instance with ‘yarn dev’"

if [ $# -gt 0 ]; then
test_chapters "$@"
else
Expand Down
2 changes: 0 additions & 2 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ TOS_MAINTAINER = "Sharzy"
# the email displayed in TOS
TOS_MAIL = "[email protected]"

[vars.BASIC_AUTH]
user1 = "passwd1"

0 comments on commit e905dcf

Please sign in to comment.