11'use strict' ;
22
33const sinon = require ( 'sinon' ) ;
4- const BbPromise = require ( 'bluebird' ) ;
54
65const GoogleProvider = require ( '../../provider/googleProvider' ) ;
76const GoogleDeploy = require ( '../googleDeploy' ) ;
@@ -39,8 +38,8 @@ describe('SetIamPolicy', () => {
3938 let setPoliciesStub ;
4039
4140 beforeEach ( ( ) => {
42- getFunctionsStub = sinon . stub ( googleDeploy , 'getFunctions' ) . returns ( BbPromise . resolve ( ) ) ;
43- setPoliciesStub = sinon . stub ( googleDeploy , 'setPolicies' ) . returns ( BbPromise . resolve ( ) ) ;
41+ getFunctionsStub = sinon . stub ( googleDeploy , 'getFunctions' ) . returns ( Promise . resolve ( ) ) ;
42+ setPoliciesStub = sinon . stub ( googleDeploy , 'setPolicies' ) . returns ( Promise . resolve ( ) ) ;
4443 } ) ;
4544
4645 afterEach ( ( ) => {
@@ -58,7 +57,7 @@ describe('SetIamPolicy', () => {
5857
5958 describe ( '#getFunctions' , ( ) => {
6059 it ( 'should return "undefined" if no functions are found' , ( ) => {
61- requestStub . returns ( BbPromise . resolve ( [ ] ) ) ;
60+ requestStub . returns ( Promise . resolve ( [ ] ) ) ;
6261
6362 return googleDeploy . getFunctions ( ) . then ( ( foundFunctions ) => {
6463 expect ( foundFunctions ) . toEqual ( undefined ) ;
@@ -81,7 +80,7 @@ describe('SetIamPolicy', () => {
8180 const response = {
8281 functions : [ { name : 'cloud-function-1' } , { name : 'cloud-function-2' } ] ,
8382 } ;
84- requestStub . returns ( BbPromise . resolve ( response ) ) ;
83+ requestStub . returns ( Promise . resolve ( response ) ) ;
8584
8685 return googleDeploy . getFunctions ( ) . then ( ( foundFunctions ) => {
8786 expect ( foundFunctions ) . toEqual ( [
@@ -160,7 +159,7 @@ describe('SetIamPolicy', () => {
160159 googleDeploy . serverless . service . provider . functionIamBindings = {
161160 'cloud-function-2' : [ { role : 'roles/cloudfunctions.invoker' , members : [ 'allUsers' ] } ] ,
162161 } ;
163- requestStub . returns ( BbPromise . resolve ( ) ) ;
162+ requestStub . returns ( Promise . resolve ( ) ) ;
164163
165164 return googleDeploy . setPolicies ( foundFunctions ) . then ( ( ) => {
166165 expect ( consoleLogStub . calledOnce ) . toEqual ( true ) ;
0 commit comments