File tree 4 files changed +36
-6
lines changed
4 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 7
7
},
8
8
"repository" : " googleapis/nodejs-cloud-container" ,
9
9
"private" : true ,
10
+ "files" : [
11
+ " *.js"
12
+ ],
10
13
"scripts" : {
11
- "test" : " echo no sample tests 👻 "
14
+ "test" : " mocha system-test --timeout 10000 "
12
15
},
13
16
"dependencies" : {
14
17
"@google-cloud/container" : " ^0.3.0"
15
18
},
16
19
"devDependencies" : {
17
- "@google-cloud/nodejs-repo-tools" : " ^3.0.0"
20
+ "chai" : " ^4.2.0" ,
21
+ "execa" : " ^1.0.0" ,
22
+ "mocha" : " ^5.2.0"
18
23
}
19
24
}
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ async function main() {
39
39
} ;
40
40
41
41
const [ response ] = await client . listClusters ( request ) ;
42
+ console . log ( 'Clusters:' ) ;
42
43
console . log ( response ) ;
43
44
// [END container_quickstart]
44
45
}
Original file line number Diff line number Diff line change 1
1
---
2
- rules :
3
- node/no-unpublished-require : off
4
- node/no-unsupported-features : off
5
- no-empty : off
2
+ env :
3
+ mocha : true
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright 2017, Google, Inc.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ 'use strict' ;
17
+
18
+ const { assert} = require ( 'chai' ) ;
19
+ const execa = require ( 'execa' ) ;
20
+
21
+ describe ( 'container samples' , ( ) => {
22
+ it ( 'should run the quickstart' , async ( ) => {
23
+ const { stdout} = await execa . shell ( 'node quickstart' ) ;
24
+ assert . match ( stdout , / C l u s t e r s : / ) ;
25
+ } ) ;
26
+ } ) ;
You can’t perform that action at this time.
0 commit comments