1- 'use strict' ;
2- const expect = require ( 'chai' ) . expect ;
3- const should = require ( 'chai' ) . should ;
4- const sinon = require ( 'sinon' ) ;
5- const Serverless = require ( 'serverless/lib/Serverless' ) ;
6- const CLI = require ( 'serverless/lib/classes/CLI' ) ;
7-
8-
9- describe ( 'build.js' , ( ) => {
10- describe ( '#findFunctionsPathAndHandler()' , ( ) => {
11-
12-
13- it ( 'should throw err - can not read property' , ( done ) => {
14- stepFunctionsOfflinePlugin . variables = { FirstLambda : 'firstLamda' } ;
15- stepFunctionsOfflinePlugin . hooks [ hooks . buildStepWorkFlow ] ( )
16- . then ( ( res ) => {
17- expect ( res ) . to . be . an ( 'undefined' )
18- } )
19- . catch ( ( err ) => {
20- expect ( err ) . to . throw ( / C a n n o t r e a d p r o p e r t y / ) ;
21- } ) . finally ( done ) ;
22- } ) ;
23-
24- it ( 'should throw err - goody' , ( done ) => {
25- stepFunctionsOfflinePlugin . variables = { FirstLambda : 'firstLambda' } ;
26- stepFunctionsOfflinePlugin . hooks [ hooks . buildStepWorkFlow ] ( )
27- . then ( ( res ) => {
28- console . log ( 111 )
29- } )
30- . catch ( ( err ) => {
31- console . log ( 222 )
32-
33- } ) . finally ( done ) ;
34- } ) ;
35-
36- } ) ;
37-
38- // describe('#buildStepWorkFlow()', () => {
39- //
40- //
41- //
42- // });
43- } ) ;
1+ // 'use strict';
2+ // const expect = require('chai').expect;
3+ // const should = require('chai').should;
4+ // const sinon = require('sinon');
5+ // const Serverless = require('serverless/lib/Serverless');
6+ // const CLI = require('serverless/lib/classes/CLI');
7+ //
8+ //
9+ // describe('build.js', () => {
10+ // describe('#findFunctionsPathAndHandler()', () => {
11+ //
12+ //
13+ // it('should throw err - can not read property', (done) => {
14+ // stepFunctionsOfflinePlugin.variables = {FirstLambda: 'firstLamda'};
15+ // stepFunctionsOfflinePlugin.hooks[hooks.buildStepWorkFlow]()
16+ // .then((res) => {
17+ // expect(res).to.be.an('undefined')
18+ // })
19+ // .catch((err) => {
20+ // expect(err).to.throw(/Cannot read property/);
21+ // }).finally(done);
22+ // });
23+ //
24+ // it('should throw err - goody', (done) => {
25+ // stepFunctionsOfflinePlugin.variables = {FirstLambda: 'firstLambda'};
26+ // stepFunctionsOfflinePlugin.hooks[hooks.buildStepWorkFlow]()
27+ // .then((res) => {
28+ // console.log(111)
29+ // })
30+ // .catch((err) => {
31+ // console.log(222)
32+ //
33+ // }).finally(done);
34+ // });
35+ //
36+ // });
37+ //
38+ // // describe('#buildStepWorkFlow()', () => {
39+ // //
40+ // //
41+ // //
42+ // // });
43+ // });
0 commit comments