Skip to content

Commit

Permalink
fix: fix the sample tests (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Oct 26, 2018
1 parent 23f7471 commit 2237469
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/google-cloud-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@
"cover": "nyc --reporter=lcov mocha test/*.js && nyc report",
"docs": "jsdoc -c .jsdoc.js",
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"lint": "eslint src/ samples/ system-test/ test/",
"prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js",
"lint": "eslint '**/*.js'",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha system-test/*.js --timeout 600000",
"test-no-cover": "mocha test/*.js",
"test": "npm run cover"
"test": "npm run cover",
"fix": "eslint --fix '**/*.js'"
},
"dependencies": {
"@google-cloud/common": "^0.26.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/google-cloud-node/smoke-test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
env:
mocha: true
rules:
no-console: off
3 changes: 2 additions & 1 deletion packages/google-cloud-node/smoke-test/speech_smoke_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ describe('SpeechSmokeTest', () => {
config: config,
audio: audio,
};
client.recognize(request)
client
.recognize(request)
.then(responses => {
const response = responses[0];
console.log(response);
Expand Down
5 changes: 2 additions & 3 deletions packages/google-cloud-node/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@
"")

templates = common_templates.node_library()
# TODO: remove excludes once var's are converted to const/let
s.copy(templates, excludes=['.eslintrc.yml'])
s.copy(templates)

#
# Node.js specific cleanup
#
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'prettier'])
subprocess.run(['npm', 'run', 'fix'])

0 comments on commit 2237469

Please sign in to comment.