@@ -6,19 +6,18 @@ const expect = require("chai").expect;
66const should = require ( "should" ) ;
77const aws = require ( "aws-sdk" ) ;
88const seeder = require ( "../src/seeder.js" ) ;
9- const dataApp = require ( "../index.js" ) ;
9+ const Plugin = require ( "../index.js" ) ;
1010
11- const serverlessMock = require ( ' ./serverlessMock' ) ;
11+ const serverlessMock = require ( " ./serverlessMock" ) ;
1212
1313describe ( "Port function" , function ( ) {
1414 it ( "Port should return number" , function ( ) {
15- let service = new dataApp ( serverlessMock , { } ) ;
16- let myport = service . port ;
17- assert ( typeof myport , "number" ) ;
15+ let service = new Plugin ( serverlessMock , { } ) ;
16+ assert ( typeof service . port , "number" ) ;
1817 } ) ;
1918
2019 it ( "Port value should be >= 0 and < 65536" , function ( ) {
21- let service = new dataApp ( serverlessMock , { } ) ;
20+ let service = new Plugin ( serverlessMock , { } ) ;
2221 http . get ( `http://localhost:${ service . port } ` , function ( response ) {
2322 assert . equal ( response . statusCode , 200 ) ;
2423 } ) ;
@@ -37,29 +36,29 @@ describe("Check the dynamodb function",function(){
3736 } ) ;
3837
3938 it ( "Should be an object" , function ( ) {
40- let dynamoOptions = dataApp . prototype . dynamodbOptions ;
39+ let dynamoOptions = Plugin . prototype . dynamodbOptions ;
4140 let raw = new aws . DynamoDB ( dynamoOptions ) ;
4241 raw . should . be . type ( "object" ) ;
4342 } ) ;
4443
4544 it ( "Should be an object" , function ( ) {
46- let dynamoOptions = dataApp . prototype . dynamodbOptions ;
45+ let dynamoOptions = Plugin . prototype . dynamodbOptions ;
4746 let doc = new aws . DynamoDB ( dynamoOptions ) ;
4847 doc . should . be . type ( "object" ) ;
4948 } ) ;
5049} ) ;
5150
5251describe ( "Start handler function" , function ( ) {
5352 it ( "Should not be null" , function ( ) {
54- let handler = dataApp . prototype . startHandler ;
53+ let handler = Plugin . prototype . startHandler ;
5554 assert ( handler = ! null ) ;
5655 } ) ;
5756} ) ;
5857
5958
6059describe ( "createTable functon" , function ( ) {
6160 it ( "Should check as a function" , function ( ) {
62- const tbl = dataApp . prototype . createTable ;
61+ const tbl = Plugin . prototype . createTable ;
6362 assert . equal ( typeof tbl , "function" ) ;
6463 } ) ;
6564} ) ;
0 commit comments