File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,19 @@ const aws = require ("aws-sdk");
8
8
const seeder = require ( "../src/seeder.js" ) ;
9
9
const dataApp = require ( "../index.js" ) ;
10
10
11
+ const serverlessMock = require ( './serverlessMock' ) ;
12
+
11
13
describe ( "Port function" , function ( ) {
12
14
it ( "Port should return number" , function ( ) {
13
- let myport = dataApp . prototype . port ;
15
+ let service = new dataApp ( serverlessMock , { } ) ;
16
+ let myport = service . port ;
14
17
assert ( typeof myport , "number" ) ;
15
18
} ) ;
16
19
17
20
it ( "Port value should be >= 0 and < 65536" , function ( ) {
18
- http . get ( `http://localhost:${ dataApp . prototype . port } ` , function ( response ) {
19
- assert . equal ( response . statusCode , 200 ) ;
21
+ let service = new dataApp ( serverlessMock , { } ) ;
22
+ http . get ( `http://localhost:${ service . port } ` , function ( response ) {
23
+ assert . equal ( response . statusCode , 200 ) ;
20
24
} ) ;
21
25
} ) ;
22
26
} ) ;
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ service : { } ,
3
+ cli : {
4
+ log : ( ) => { }
5
+ } ,
6
+ custom : { }
7
+ } ;
You can’t perform that action at this time.
0 commit comments