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', () => {
4242 expect ( fn . __trigger . regions ) . to . deep . equal ( [ 'my-region' ] ) ;
4343 } ) ;
4444
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+ // });
5656
5757 it ( 'should allow runtime options to be set' , ( ) => {
5858 let fn = functions
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ import { HttpsFunction } from './cloud-functions';
3535
3636/**
3737 * 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')`
4040 */
41- export function region ( ... regions : string [ ] ) {
42- return new FunctionBuilder ( { regions } ) ;
41+ export function region ( region : string ) {
42+ return new FunctionBuilder ( { regions : [ region ] } ) ;
4343}
4444
4545/**
@@ -78,11 +78,11 @@ export class FunctionBuilder {
7878
7979 /**
8080 * 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')`
8383 */
84- region = ( ... regions : string [ ] ) => {
85- this . options . regions = regions ;
84+ region = ( region : string ) => {
85+ this . options . regions = [ region ] ;
8686 return this ;
8787 } ;
8888
You can’t perform that action at this time.
0 commit comments