File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,17 @@ describe('FunctionBuilder', () => {
42
42
expect ( fn . __trigger . regions ) . to . deep . equal ( [ 'my-region' ] ) ;
43
43
} ) ;
44
44
45
- it ( 'should allow multiple regions to be set' , ( ) => {
46
- let fn = functions
47
- . region ( 'my-region' , 'my-other-region' )
48
- . auth . user ( )
49
- . onCreate ( user => user ) ;
50
-
51
- expect ( fn . __trigger . regions ) . to . deep . equal ( [
52
- 'my-region' ,
53
- 'my-other-region' ,
54
- ] ) ;
55
- } ) ;
45
+ // it('should allow multiple regions to be set', () => {
46
+ // let fn = functions
47
+ // .region('my-region', 'my-other-region')
48
+ // .auth.user()
49
+ // .onCreate(user => user);
50
+
51
+ // expect(fn.__trigger.regions).to.deep.equal([
52
+ // 'my-region',
53
+ // 'my-other-region',
54
+ // ]);
55
+ // });
56
56
57
57
it ( 'should allow runtime options to be set' , ( ) => {
58
58
let fn = functions
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ import { HttpsFunction } from './cloud-functions';
35
35
36
36
/**
37
37
* Configure the regions that the function is deployed to.
38
- * @param regions One or more parameters indicating the regions .
39
- * For example: `functions.region('us-central1', 'us- east1')`
38
+ * @param region Region string .
39
+ * For example: `functions.region('us-east1')`
40
40
*/
41
- export function region ( ... regions : string [ ] ) {
42
- return new FunctionBuilder ( { regions } ) ;
41
+ export function region ( region : string ) {
42
+ return new FunctionBuilder ( { regions : [ region ] } ) ;
43
43
}
44
44
45
45
/**
@@ -78,11 +78,11 @@ export class FunctionBuilder {
78
78
79
79
/**
80
80
* Configure the regions that the function is deployed to.
81
- * @param regions One or more parameters indicating the region .
82
- * For example: `functions.region('us-central1', 'us- east1')`
81
+ * @param region Region string .
82
+ * For example: `functions.region('us-east1')`
83
83
*/
84
- region = ( ... regions : string [ ] ) => {
85
- this . options . regions = regions ;
84
+ region = ( region : string ) => {
85
+ this . options . regions = [ region ] ;
86
86
return this ;
87
87
} ;
88
88
You can’t perform that action at this time.
0 commit comments