File tree Expand file tree Collapse file tree
packages/google-cloud-speech/samples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,14 +12,21 @@ recognition technologies into developer applications.
1212* [ Setup] ( #setup )
1313* [ Samples] ( #samples )
1414 * [ Recognize] ( #recognize )
15+ * [ Running the tests] ( #running-the-tests )
1516
1617## Setup
1718
18- 1 . Read [ Prerequisites] [ prereq ] and [ How to run a sample] [ run ] first.
19- 1 . Install dependencies:
19+ 1 . Read [ Prerequisites] [ prereq ] and [ How to run a sample] [ run ] first.
20+ 1 . Install dependencies:
21+
22+ With ` npm ` :
2023
2124 npm install
2225
26+ With ` yarn ` :
27+
28+ yarn install
29+
2330[ prereq ] : ../README.md#prerequisities
2431[ run ] : ../README.md#how-to-run-a-sample
2532
@@ -61,3 +68,18 @@ For more information, see https://cloud.google.com/speech/docs
6168
6269[ recognize_docs ] : https://cloud.google.com/speech/docs
6370[ recognize_code ] : recognize.js
71+
72+ ## Running the tests
73+
74+ 1 . Set the ` GCLOUD_PROJECT ` and ` GOOGLE_APPLICATION_CREDENTIALS ` environment
75+ variables.
76+
77+ 1 . Run the tests:
78+
79+ With ` npm ` :
80+
81+ npm test
82+
83+ With ` yarn ` :
84+
85+ yarn test
Original file line number Diff line number Diff line change 22 "name" : " nodejs-docs-samples-speech" ,
33 "version" : " 0.0.1" ,
44 "private" : true ,
5- "license" : " Apache Version 2.0" ,
5+ "license" : " Apache- 2.0" ,
66 "author" : " Google Inc." ,
7+ "repository" : {
8+ "type" : " git" ,
9+ "url" : " https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
10+ },
11+ "cloud" : {
12+ "requiresKeyFile" : true ,
13+ "requiresProjectId" : true
14+ },
15+ "engines" : {
16+ "node" : " >=4.3.2"
17+ },
718 "scripts" : {
8- "test" : " cd ..; npm run st -- --verbose speech/system-test/*.test.js"
19+ "lint" : " samples lint" ,
20+ "pretest" : " npm run lint" ,
21+ "system-test" : " ava -T 20s --verbose system-test/*.test.js" ,
22+ "test" : " npm run system-test"
923 },
1024 "dependencies" : {
1125 "@google-cloud/speech" : " 0.9.0" ,
1226 "@google-cloud/storage" : " 1.0.0" ,
1327 "node-record-lpcm16" : " 0.3.0" ,
1428 "yargs" : " 7.0.2"
1529 },
16- "engines" : {
17- "node" : " >=4.3.2"
30+ "devDependencies" : {
31+ "@google-cloud/nodejs-repo-tools" : " 1.3.1" ,
32+ "ava" : " 0.19.1" ,
33+ "proxyquire" : " 1.7.11" ,
34+ "sinon" : " 2.1.0"
1835 }
1936}
Original file line number Diff line number Diff line change 11/**
2- * Copyright 2016 , Google, Inc.
2+ * Copyright 2017 , Google, Inc.
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
55 * You may obtain a copy of the License at
You can’t perform that action at this time.
0 commit comments