Project Name - da-tf-project-1-1b0f Environment - development Service Name - vonage-etl-api Build Id - db20d98b-1e3f-4689-b314-b51bd9fc1907 Executed Time - Thu Oct 10 12:34:22 UTC 2024 ------------------------------------------------ > vonage-etl-api@1.0.0 nyc:test-unit > nyc mocha 'test/unit/**/**/*.spec.js' 'test/unit/**/*.spec.js' #fileController uploadFile - upload a file upload file successfully ✔ should upload file upload throw error ✔ should throw error upload File access denied deleteFile - delete a file delete file successfully ✔ should delete file delete file throws error ✔ should throw error invalid user #fileService uploadFile - upload file upload a file successfully ✔ should upload file successfully ✔ should different file format successfully uploading a file throws error ✔ should throw error Amount should be greater then zero ✔ should throw error Invalid file format ✔ should throw error bad request: job build error ✔ should throw error bad request: file build error createFile - create a file create a file successfully ✔ should create file successfully uploading a file throws error ✔ should throw error could not create getFileByJobId - get file by job Id get file successfully ✔ should get file successfully get a file throws error ✔ should throw error could not find one deleteFile - delete file delete file successfully ✔ should delete file successfully delete file throws error ✔ should throw error File does not exist #attributeHandler buildAttributeClause - builds the attribute clause buildAttributeClause should run successfully ✔ should buildAttributeClause successfully buildAttributeClause must throw errors ✔ should throw Error not a array ✔ should throw Error not a array of string ✔ should throw Error not mapping must be obj #filterHandler checkType - check type of data check types successfully ✔ should check string type successfully ✔ should check array type successfully ✔ should check object type successfully check types unsuccessful ✔ should return false validate - validate the data validate successfully ✔ should validate without errors successfully validate throws errors ✔ should throw errors The filter value type is not an object ✔ should throw errors Filter will not be applied across this column ✔ should throw errors Column value type is not an object ✔ should throw errors column operator is incorrect ✔ should throw errors value isNull ✔ should throw errors Column value is incorrect ✔ should throw errors column value type is incorrect ✔ should throw errors Column value is incorrect processFilter - processing the filter process filter successfully ✔ should process Filter `LIKE` successfully ✔ should process Filter `GTE` successfully ✔ should process Filter `LT` successfully ✔ should process Filter `GT` successfully ✔ should process Filter `IN` successfully ✔ should process Filter `BTW` successfully ✔ should process Filter `ISNULL` successfully ✔ should process Filter `TOKEN` successfully ✔ should process Filter `default` successfully processFilter throws errors ✔ should throw errors Invalid value for BTW operator buildWhereClause - build where clause build where clause successfully ✔ should build Where Clause for `LIKE` successfully ✔ should build Where Clause for `LT` successfully ✔ should build Where Clause for `GT` successfully ✔ should build Where Clause for `IN` successfully ✔ should build Where Clause for `BTW` successfully ✔ should build Where Clause for `BTW` date successfully ✔ should build Where Clause for DATE successfully ✔ should build Where Clause for `ISNULL=false` successfully ✔ should build Where Clause for `ISNULL=true` successfully ✔ should build Where Clause for `LTE` successfully ✔ should build Where Clause for `GTE` successfully ✔ should build Where Clause for `TOKEN` successfully ✔ should build Where Clause for `=` successfully buildWhereClause throws errors ✔ should throw error #sortHandler validateSort - validating sort validateSort should run successfully ✔ should validateSort successfully validateSort must throw errors ✔ should throw Error The sort value type is not an object ✔ should throw Error Sort will not be applied across this column ✔ should throw Error Sort will not be applied to multiple columns at a time ✔ should throw Error Sort value must be 'asc' or' desc' customOrder - custom order customOrder should run successfully ✔ should customOrder successfully buildOrderClause - build Order Clause buildOrderClause should run successfully ✔ should build Order Clause successfully #jobController getJobs- Get All job when geting all jobs successfully ✔ should get all jobs sucessfully while getting job an error occur ✔ should throw Error when db reject the request getSignedUrl- sign url when getting sign url successfully ✔ should getSignedUrl sucessfully while getting SignUrl an error occur ✔ should throw Error when db reject the request #jobService getJobs - get jobs retrieving jobs successfully ✔ should retrieve jobs successfully retrieving jobs error occur ✔ should throw Error unable to parse attributes ✔ should throw Error unable to apply sort ✔ should throw Error unable to parse filter ✔ should throw Error invalid sort applied getSignedUrl - get Signed Url retrieving Signed Url successfully ✔ should retrieve Signed Url import successfully ✔ should retrieve Signed Url export successfully retrieving Signed Url error occur ✔ should throw Error unable to parse attributes addJob - add job adding job successfully ✔ should add job successfully adding job error occur ✔ should throw Error internal server Error updateJob - add job update Job successfully ✔ should update job successfully update job error occur ✔ should throw Error internal server Error Transaction ✔ should initialize transaction ✔ should commit transaction ✔ should rollback transaction ModelColumnController getModelColumnNames ✔ should return model column names if user is authorized ✔ should throw Unauthorized error if user is not authorized ✔ should call next with error if service throws an error truncateModel ✔ should truncate model data if user is authorized ✔ should throw Unauthorized error if user is not authorized ✔ should call next with error if service throws an error ModelColumnService getModelColumnNames ✔ should return filtered column names for "sfdc contact" ✔ should return filtered column names for "sfdc opportunities stage progression" ✔ should return filtered column names for "sfdc opportunities" ✔ should return filtered column names for "sfdc campaign member" ✔ should return filtered column names for "outreach call dump" ✔ should return filtered column names for "outreach email dump" ✔ should return filtered column names for "content syndication" ✔ should return filtered column names for "medision logic" ✔ should return filtered column names for "6sense" ✔ should return filtered column names for "base accounts" ✔ should return filtered column names for "unified contacts" ✔ should return filtered column names for "unified accounts" ✔ should throw BadRequest for invalid column name truncateModelData ✔ should truncate data for "sfdc opportunities" ✔ should truncate data for "sfdc campaign member" ✔ should truncate data for "outreach call dump" ✔ should truncate data for "outreach email dump" ✔ should truncate data for "content syndication" ✔ should truncate data for "medision logic" ✔ should truncate data for "6sense" ✔ should truncate data for "base accounts" ✔ should truncate data for "unified contacts" ✔ should truncate data for "unified accounts" ✔ should truncate data for "sfdc contact" ✔ should truncate data for "sfdc opportunities stage progression" ✔ should throw BadRequest for invalid model name getModelColumnNames - additional tests ✔ should return empty array for "sfdc contact" with no attributes ✔ should return empty array for "sfdc opportunities stage progression" with no attributes truncateModelData - additional tests ✔ should handle error when truncating data for "sfdc contact" ✔ should handle error when truncating data for "sfdc opportunities stage progression" Test Suite parseLimitAndOffset ✔ should return default limit and offset if no query parameters are provided ✔ should throw an error if page is not a positive integer ✔ should throw an error if limit is not a positive integer unmarshalBody ✔ should return the body if it is not empty ✔ should throw an error if body is empty parseSelectFields ✔ should return undefined when fields is not provided ✔ should return undefined when fields is an empty string ✔ should return undefined when no allowed fields are selected ✔ should return an array of allowed fields when fields is a string ✔ should return an array of allowed fields when fields is an array parseFilterQueries ✔ should return where object as is if queryParams is falsy ✔ should apply OR conditions correctly ✔ should apply AND conditions correctly ✔ should handle a mix of AND and OR conditions createSequelizeOrder ✔ should return an empty array if no order parameters are provided ✔ should return a correctly formatted order array for ascending order ✔ should return a correctly formatted order array for descending order ✔ should return a correctly formatted order array for both ascending and descending order #string #isEmptyString - check if is an empty string check if returns true successfully ✔ should return true for an empty string ✔ should return true for null input ✔ should return true for a string containing only whitespace characters check if returns false successfully ✔ should return false for a non-empty string #trimSpaceFromObject - trim spaces from object check if trimming space from object Successfully ✔ should trim spaces from the specified fields in the object ✔ should handle non-array fieldArray by converting it to an array check if errors are handeled ✔ should not modify the object if it is falsy ✔ should not modify the object if fieldArray is falsy ✔ should throw an error if a field value is not a string #isNonEmptyString - check if not an empty string check if true is returned successfully ✔ should return true for a non-empty string check if false is returned successfully ✔ should return false for an empty string ✔ should return false for a non-string input #removeExtraSpaces - removes extra whitespace check if removes whitespace successfully ✔ should remove extra spaces from a string #validateStringLength - validate the string length check if not throws error successfully ✔ should not throw an error for an empty string check if throws error successfully ✔ should throw entity should consist of minLength-maxLength characters ✔ should throw entityName should have atleast minLength characters ✔ should throw entityName cannot have more than maxLength characters #replaceAndWithAmpersand - replace with ampersand ✔ should replace "and" with "&" in lowercase string ✔ should handle undefined input Utils/uuid validateUuid check if uuid is validate or not ✔ should throw an error if uuid is invalid ✔ should use "uuid" as default entity name ✔ should not throw an error if uuid is valid validateUuidInArray check uuid in array is valide or not ✔ should not throw an error if all uuids in the array are valid ✔ should treat non-array input as a single-element array isUuidValid check is uuid is valid or not ✔ should return true if uuid is valid ✔ should return false if uuid is invalid generateShortUUID check short uuid is generted or not ✔ should generate a short uuid Utility Functions getMissingKeys ✔ should return an array of missing keys ✔ should return an empty array if no keys are missing removeNullKeysInObj ✔ should return an object without null or undefined keys processMissingKeys ✔ should throw a BadRequest error with a single missing key message ✔ should throw a BadRequest error with multiple missing keys message ✔ should not throw an error if the array is empty validateObject ✔ should return an array of missing keys ✔ should return an empty array if no keys are missing removeUnwantedKeys ✔ should return an object with only the required keys removeKeysFromObject ✔ should remove specified keys from the object ✔ should throw a TypeError if the first argument is not an object ✔ should throw a TypeError if the second argument is not an array 176 passing (196ms) -----------------------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------------------------------|---------|----------|---------|---------|------------------- All files | 97 | 85.28 | 96.34 | 97.05 | components/file/controllers | 94.44 | 66.66 | 100 | 94.44 | file-controller.js | 94.44 | 66.66 | 100 | 94.44 | 164,185 components/file/services | 98.09 | 80.64 | 100 | 98.09 | file-service.js | 98.09 | 80.64 | 100 | 98.09 | 65,179 components/helpers | 96.8 | 84.73 | 100 | 96.53 | attributeHandler.js | 100 | 100 | 100 | 100 | filterHandler.js | 96.89 | 85.22 | 100 | 96.66 | 144-150 sortHandler.js | 95.65 | 75.86 | 100 | 95.12 | 84-92 components/job/controllers | 93.75 | 63.63 | 100 | 93.75 | job-controller.js | 93.75 | 63.63 | 100 | 93.75 | 188,207 components/job/services | 99.13 | 72.72 | 100 | 99.13 | job.js | 99.13 | 72.72 | 100 | 99.13 | 231 components/model-columns/services | 100 | 100 | 100 | 100 | model-columns-service.js | 100 | 100 | 100 | 100 | configs/settings | 91.89 | 50 | 100 | 91.89 | main.config.js | 100 | 100 | 100 | 100 | settings-config.js | 89.65 | 50 | 100 | 89.65 | 8,24,32 settings.config.development.js | 100 | 100 | 100 | 100 | constant | 100 | 100 | 100 | 100 | constants.js | 100 | 100 | 100 | 100 | lib | 100 | 66.66 | 100 | 100 | transaction.js | 100 | 66.66 | 100 | 100 | 16-22 utils | 96.41 | 90.76 | 89.65 | 96.8 | deepFreeze.js | 100 | 100 | 100 | 100 | number.js | 85.71 | 100 | 50 | 100 | request.js | 100 | 95.83 | 100 | 100 | 57-61 string.js | 100 | 97.22 | 100 | 100 | 34 uuid.js | 100 | 84.61 | 100 | 100 | 9-17 validation-service.js | 87.23 | 70.83 | 80 | 86.95 | 15-23 -----------------------------------|---------|----------|---------|---------|-------------------