File tree 4 files changed +3025
-97
lines changed
4 files changed +3025
-97
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ function analyzeShots (gcsUri) {
132
132
// [END analyze_shots]
133
133
}
134
134
135
- const cli = require ( `yargs` )
135
+ require ( `yargs` ) // eslint-disable-line
136
136
. demand ( 1 )
137
137
. command (
138
138
`faces <gcsUri>` ,
Original file line number Diff line number Diff line change 2
2
"name" : " nodejs-docs-samples-videointelligence" ,
3
3
"version" : " 0.0.1" ,
4
4
"private" : true ,
5
- "license" : " Apache Version 2.0" ,
5
+ "license" : " Apache- 2.0" ,
6
6
"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
+ },
7
18
"scripts" : {
8
- "test" : " cd ..; npm run st -- --verbose video/system-test/*.test.js"
19
+ "lint" : " samples lint" ,
20
+ "pretest" : " npm run lint" ,
21
+ "system-test" : " ava -T 10m --verbose system-test/*.test.js" ,
22
+ "test" : " npm run system-test"
9
23
},
10
24
"dependencies" : {
11
25
"@google-cloud/videointelligence" : " https://storage.googleapis.com/videointelligence-alpha/videointelligence-nodejs.tar.gz" ,
12
- "yargs" : " 7.0.2 "
26
+ "yargs" : " 7.1.0 "
13
27
},
14
- "engines" : {
15
- "node" : " >=4.3.2"
28
+ "devDependencies" : {
29
+ "@google-cloud/nodejs-repo-tools" : " 1.3.1" ,
30
+ "ava" : " 0.19.1"
16
31
}
17
32
}
Original file line number Diff line number Diff line change 17
17
18
18
'use strict' ;
19
19
20
- require ( `../../system-test/_setup` ) ;
21
20
const path = require ( `path` ) ;
21
+ const test = require ( `ava` ) ;
22
+ const tools = require ( `@google-cloud/nodejs-repo-tools` ) ;
22
23
23
24
const cmd = `node analyze.js` ;
24
25
const cwd = path . join ( __dirname , `..` ) ;
25
26
26
27
// analyze_faces
27
28
test ( `should analyze faces` , async ( t ) => {
28
- const output = await runAsync ( `${ cmd } faces gs://nodejs-docs-samples/video/google_gmail.mp4` , cwd ) ;
29
+ const output = await tools . runAsync ( `${ cmd } faces gs://nodejs-docs-samples/video/google_gmail.mp4` , cwd ) ;
29
30
t . regex ( output , / T h u m b n a i l s i z e : \d + / ) ;
30
31
} ) ;
31
32
32
33
// analyze_labels
33
34
test ( `should analyze labels` , async ( t ) => {
34
- const output = await runAsync ( `${ cmd } labels gs://nodejs-docs-samples/video/cat.mp4` , cwd ) ;
35
+ const output = await tools . runAsync ( `${ cmd } labels gs://nodejs-docs-samples/video/cat.mp4` , cwd ) ;
35
36
t . regex ( output , / L a b e l d e s c r i p t i o n : W h i s k e r s / ) ;
36
37
} ) ;
37
38
38
39
// analyze_shots
39
40
test ( `should analyze shots` , async ( t ) => {
40
- const output = await runAsync ( `${ cmd } shots gs://nodejs-docs-samples/video/gbike_dinosaur.mp4` , cwd ) ;
41
+ const output = await tools . runAsync ( `${ cmd } shots gs://nodejs-docs-samples/video/gbike_dinosaur.mp4` , cwd ) ;
41
42
t . regex ( output , / S c e n e 0 : / ) ;
42
43
} ) ;
You can’t perform that action at this time.
0 commit comments