From 22476cb8fdaa1b7a85b8b0aac53b3e67fe94f890 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 10 Feb 2019 19:27:13 -0800 Subject: [PATCH] build: create docs test npm scripts --- .kokoro/docs.sh | 10 +--------- package.json | 9 ++++++--- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.kokoro/docs.sh b/.kokoro/docs.sh index ea6e514f4..a4f318794 100755 --- a/.kokoro/docs.sh +++ b/.kokoro/docs.sh @@ -22,12 +22,4 @@ cd $(dirname $0)/.. npm install -npm run docs - -# Check broken links -BIN=./node_modules/.bin - -npm install broken-link-checker -npm install http-server -$BIN/http-server -p 8080 docs/ & -$BIN/blc http://localhost:8080 -r --exclude www.googleapis.com +npm run docs-test diff --git a/package.json b/package.json index 63d299651..31bdb65fd 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,8 @@ "source-map-support": "^0.5.6", "stream-events": "^1.0.4", "through2": "^3.0.0", - "typescript": "~3.3.0" + "typescript": "~3.3.0", + "broken-link-checker-local": "^0.2.0" }, "scripts": { "codecov": "nyc mocha build/test --reporter spec --slow 500 && codecov", @@ -73,8 +74,10 @@ "fix": "gts fix && eslint --fix samples/*.js samples/**/*.js", "prepare": "npm run compile", "posttest": "npm run lint", - "system-test": "nyc mocha build/system-test --timeout 120000", - "samples-test": "echo no sample tests 😱" + "system-test": "cross-env GOOGLE_CLOUD_USE_GRPC_JS=1 nyc mocha --timeout 1200000 build/system-test && mocha build/system-test --timeout 120000", + "samples-test": "echo no sample tests 😱", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "repository": "googleapis/gax-nodejs", "keywords": [