Skip to content

Commit

Permalink
Cleanup App Engine samples and re-work tests. (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and Ace Nassri committed Apr 24, 2017
1 parent 17bbe1b commit 9c03d78
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
26 changes: 24 additions & 2 deletions packages/google-cloud-node/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ recognition technologies into developer applications.
* [Setup](#setup)
* [Samples](#samples)
* [Recognize](#recognize)
* [Running the tests](#running-the-tests)

## Setup

1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:

With `npm`:

npm install

With `yarn`:

yarn install

[prereq]: ../README.md#prerequisities
[run]: ../README.md#how-to-run-a-sample

Expand Down Expand Up @@ -61,3 +68,18 @@ For more information, see https://cloud.google.com/speech/docs

[recognize_docs]: https://cloud.google.com/speech/docs
[recognize_code]: recognize.js

## Running the tests

1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment
variables.

1. Run the tests:

With `npm`:

npm test

With `yarn`:

yarn test
25 changes: 21 additions & 4 deletions packages/google-cloud-node/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,35 @@
"name": "nodejs-docs-samples-speech",
"version": "0.0.1",
"private": true,
"license": "Apache Version 2.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"repository": {
"type": "git",
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
},
"cloud": {
"requiresKeyFile": true,
"requiresProjectId": true
},
"engines": {
"node": ">=4.3.2"
},
"scripts": {
"test": "cd ..; npm run st -- --verbose speech/system-test/*.test.js"
"lint": "samples lint",
"pretest": "npm run lint",
"system-test": "ava -T 20s --verbose system-test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
"@google-cloud/speech": "0.9.0",
"@google-cloud/storage": "1.0.0",
"node-record-lpcm16": "0.3.0",
"yargs": "7.0.2"
},
"engines": {
"node": ">=4.3.2"
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "1.3.1",
"ava": "0.19.1",
"proxyquire": "1.7.11",
"sinon": "2.1.0"
}
}
2 changes: 1 addition & 1 deletion packages/google-cloud-node/samples/quickstart.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016, Google, Inc.
* Copyright 2017, Google, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down

0 comments on commit 9c03d78

Please sign in to comment.