Skip to content

Quality

Quality #919

GitHub Actions / Test Report (22.11.0) succeeded Nov 11, 2024 in 1s

441 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
packages/archetype/junit.xml 9✅ 11s
packages/aws-sqs/junit.xml 34✅ 64s
packages/camunda/junit.xml 2✅ 14s
packages/commons/junit.xml 7✅ 3s
packages/core/junit.xml 104✅ 18s
packages/dynamoose/junit.xml 27✅ 6s
packages/elk/junit.xml 22✅ 29s
packages/filters/junit.xml 15✅ 9s
packages/health/junit.xml 10✅ 12s
packages/http-client/junit.xml 22✅ 13s
packages/mailer/junit.xml 27✅ 9s
packages/paas/junit.xml 1ms
packages/qrcode/junit.xml 29✅ 8s
packages/rate-limit/junit.xml 1✅ 6s
packages/redis/junit.xml 16✅ 13s
packages/response-parser/junit.xml 5✅ 3s
packages/snowflake-uid/junit.xml 19✅ 7s
packages/test-utils/junit.xml 39✅ 114s
packages/tracing/junit.xml 6✅ 9s
packages/typeorm/junit.xml 6✅ 19s
packages/utils/junit.xml 41✅ 36s

✅ packages/archetype/junit.xml

9 tests were completed in 11s with 9 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/archetype.controller.spec.ts 2✅ 911ms
src/test/archetype.module.spec.ts 1✅ 981ms
src/test/archetype.service.spec.ts 5✅ 8s
src/test/constants.spec.ts 1✅ 814ms

✅ src/test/archetype.controller.spec.ts

ArchetypeController
  ✅ should be defined
  ✅ should be return manifest json

✅ src/test/archetype.module.spec.ts

ArchetypeModule
  ✅ should be define

✅ src/test/archetype.service.spec.ts

ArchetypeService
  ✅ should be defined
  ✅ should be read package file
  ✅ should be return archetype version
  ✅ should be return application info
  ✅ should be return manifest

✅ src/test/constants.spec.ts

Constants
  ✅ should be return exclude to prefix global

✅ packages/aws-sqs/junit.xml

34 tests were completed in 64s with 34 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/aws-sqs-message-handler.decorator.spec.ts 2✅ 747ms
src/test/aws-sqs.listener.spec.ts 7✅ 3s
src/test/aws-sqs.module.spec.ts 16✅ 6s
src/test/aws-sqs.service.spec.ts 9✅ 54s

✅ src/test/aws-sqs-message-handler.decorator.spec.ts

AwsSqsMessageHandler Decorator
  ✅ should set metadata with the correct queue name
  ✅ should set metadata with a different queue name

✅ src/test/aws-sqs.listener.spec.ts

AwsSqsListener (Integration)
  ✅ should be defined
AwsSqsListener (Integration) › onModuleInit
  ✅ should discover and bind message handlers
AwsSqsListener (Integration) › onModuleDestroy
  ✅ should stop the listener and log a message
AwsSqsListener (Integration) › listenToQueue
  ✅ should process messages and delete them after handling
  ✅ should log an error if message processing fails
  ✅ should log if no messages are received
AwsSqsListener (Integration) › getMessageHandlers
  ✅ should discover handlers with the AWS_SQS_MESSAGE_HANDLER metadata

✅ src/test/aws-sqs.module.spec.ts

AwsSqsModule › Global
  ✅ should be defined
  ✅ should be initialize global module
AwsSqsModule › Register
  ✅ should be defined
  ✅ should initialize with register (sync)
AwsSqsModule › RegisterAsync
  ✅ should be defined
  ✅ should initialize with registerAsync
AwsSqsModule › RegisterAsync without inject
  ✅ should be defined
  ✅ should initialize with registerAsync
AwsSqsModule › RegisterAsync with useClass
  ✅ should be defined
  ✅ should initialize with registerAsync with useClass
AwsSqsModule › RegisterAsync with useExisting
  ✅ should be defined
  ✅ should initialize with registerAsync with useExisting
AwsSqsModule › ForRoot
  ✅ should be defined
  ✅ should initialize with forRoot (sync)
AwsSqsModule › ForRootAsync
  ✅ should be defined
  ✅ should initialize with forRootAsync

✅ src/test/aws-sqs.service.spec.ts

AwsSqsService
  ✅ should be defined
AwsSqsService › sendMessage
  ✅ should send a message successfully
  ✅ should throw an error if the queue does not exist
  ✅ should throw an error if the message body is not a string or object
AwsSqsService › receiveMessage
  ✅ should receive messages from a queue
  ✅ should return an empty array if no messages are found
AwsSqsService › deleteMessage
  ✅ should delete a message successfully
  ✅ should throw an error if the queue does not exist
AwsSqsService › SQS Client
  ✅ should list available queues

✅ packages/camunda/junit.xml

2 tests were completed in 14s with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/camunda.module.spec.ts 2✅ 14s

✅ src/test/camunda.module.spec.ts

CamundaModule
  ✅ should be defined
  ✅ should be Subscription decorator is defined with options

✅ packages/commons/junit.xml

7 tests were completed in 3s with 7 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/build-config.spec.ts 3✅ 2s
src/test/eslint-config.spec.ts 1✅ 137ms
src/test/testing-library.spec.ts 1✅ 140ms
src/test/webpack.config.spec.ts 2✅ 386ms

✅ src/test/build-config.spec.ts

build-config
  ✅ should return the development configuration when NODE_ENV is not "build"
  ✅ should return the production configuration when NODE_ENV is "build"
  ✅ should merge with the additional config

✅ src/test/eslint-config.spec.ts

eslint-config
  ✅ should be return jest config

✅ src/test/testing-library.spec.ts

testing-library
  ✅ should be return jest config

✅ src/test/webpack.config.spec.ts

webpack.config
  ✅ should return the development configuration when NODE_ENV is not "build"
  ✅ should return the production configuration when NODE_ENV is "build"

✅ packages/core/junit.xml

104 tests were completed in 18s with 104 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/app.config.schema.spec.ts 9✅ 840ms
src/test/commons.spec.ts 5✅ 799ms
src/test/csrf-token.spec.ts 15✅ 800ms
src/test/csrf.guard.spec.ts 10✅ 699ms
src/test/exclude.filter.decorator.spec.ts 2✅ 753ms
src/test/filtering.decorator.spec.ts 19✅ 7s
src/test/filtering.dto.spec.ts 6✅ 732ms
src/test/https-certificate.spec.ts 2✅ 751ms
src/test/pagination.decorator.spec.ts 7✅ 764ms
src/test/pagination.dto.spec.ts 4✅ 740ms
src/test/public.decorator.spec.ts 2✅ 749ms
src/test/roles.decorator.spec.ts 2✅ 747ms
src/test/sorting.decorator.spec.ts 7✅ 843ms
src/test/sorting.dto.spec.ts 6✅ 736ms
src/test/utils.spec.ts 8✅ 647ms

✅ src/test/app.config.schema.spec.ts

appConfigValidationSchema › validateSchema for apps
  ✅ should validate the base schema correctly
  ✅ should throw an error for invalid APP_STAGE value in base schema
  ✅ should throw an error for invalid SKIP_HEALTH_CHECKS value in base schema
  ✅ should validate the base schema with a new input correctly
  ✅ should throw an error for invalid input in the base schema
  ✅ should validate CSRF_SECRET correctly in prod stage
  ✅ should throw an error for invalid CSRF_SECRET in prod stage
  ✅ should allow optional CSRF_SECRET in non-prod stages
appConfigValidationSchema › validateSchemaForApp
  ✅ should validate the schema for app correctly

✅ src/test/commons.spec.ts

commons › with env context
  ✅ should be return commons exclude paths with context
  ✅ should be return array of exclude paths with context
  ✅ should be return array of exclude paths with globs
commons › without env context
  ✅ should be return commons exclude paths without context
  ✅ should be return array of exclude paths without context

✅ src/test/csrf-token.spec.ts

CsrfToken
  ✅ should set a CSRF token with default options
  ✅ should use custom options
  ✅ should use custom options and signed
  ✅ should set the correct cookie options
  ✅ should convert an existing Set-Cookie header string to an array and append the new CSRF token using csrfToken middleware
  ✅ should generate a new token if none is present
  ✅ should use the same token if already present
  ✅ should generate a new secret if none is present
  ✅ should use the same secret if already present
  ✅ should verify a valid token
  ✅ should not verify an invalid token using verify function
  ✅ should not verify an invalid token using tokenProvider directly
  ✅ should get CSRF token from cookies
  ✅ should get CSRF token from signed cookies
  ✅ should return undefined if CSRF token is not found in any source

✅ src/test/csrf.guard.spec.ts

CsrfGuard
  ✅ should be defined
  ✅ should throw an exception if CSRF token is not found
  ✅ should throw an exception if CSRF token is invalid
  ✅ should throw an exception if CSRF token is invalid device
  ✅ should throw an exception if CSRF token is invalid IP device
  ✅ should allow access if CSRF token is valid
  ✅ should throw an exception if CSRF token is only found in body but is invalid
  ✅ should throw an exception if CSRF token is only found in query but is invalid
  ✅ should throw an exception if CSRF token is only found in cookie but is invalid
  ✅ should throw an exception if CSRF token is only found in signed cookie but is invalid

✅ src/test/exclude.filter.decorator.spec.ts

ExcludeFilter decorator
  ✅ should be defined
  ✅ should be return key

✅ src/test/filtering.decorator.spec.ts

Filtering Decorator
  ✅ should return empty array if no filter query params are provided
  ✅ should return the correct fields, rules, and values from query params
  ✅ should properly handle the filter rule EQUALS
  ✅ should properly handle the filter rule NOT_EQUALS
  ✅ should properly handle the filter rule GREATER_THAN
  ✅ should properly handle the filter rule GREATER_THAN_OR_EQUALS
  ✅ should properly handle the filter rule LESS_THAN
  ✅ should properly handle the filter rule LESS_THAN_OR_EQUALS
  ✅ should properly handle the filter rule LIKE
  ✅ should properly handle the filter rule NOT_LIKE
  ✅ should properly handle the filter rule IN
  ✅ should properly handle the filter rule NOT_IN
  ✅ should properly handle the filter rule IS_NULL
  ✅ should properly handle the filter rule IS_NOT_NULL
  ✅ should throw BadRequestException if filter parameter format is invalid
  ✅ should throw BadRequestException if property is not included in validProperties
  ✅ should throw BadRequestException if validProperties is not an array
  ✅ should throw BadRequestException if filter parameter is in incorrect format
  ✅ should throw BadRequestException if filter rule is not a valid FilterRule

✅ src/test/filtering.dto.spec.ts

Filtering Dto › FilteringCriteriaDto
  ✅ should validate a valid FilteringCriteriaDto
  ✅ should not validate an invalid FilteringCriteriaDto with invalid rule
  ✅ should validate a FilteringCriteriaDto with optional values for IS_NULL rule
Filtering Dto › FilteringParamsDto
  ✅ should validate a valid FilteringParamsDto
  ✅ should not validate an invalid FilteringParamsDto with invalid rule
  ✅ should validate an empty filters array

✅ src/test/https-certificate.spec.ts

https-certificate
  ✅ should be return https certificate config
  ✅ should be return https certificate config empty

✅ src/test/pagination.decorator.spec.ts

Pagination Decorator
  ✅ should return default page and size if no query params are provided
  ✅ should return the correct page and size from query params
  ✅ should throw BadRequestException if page is not a positive integer
  ✅ should throw BadRequestException if size is not a positive integer
  ✅ should throw BadRequestException if page is a string
  ✅ should throw BadRequestException if size is a string
  ✅ should throw BadRequestException if size exceeds the maximum value

✅ src/test/pagination.dto.spec.ts

PaginationParamsDto
  ✅ should validate a valid DTO
  ✅ should set default values for missing fields
  ✅ should not validate an invalid DTO
  ✅ should not validate when page is undefined

✅ src/test/public.decorator.spec.ts

Public decorator
  ✅ should be defined
  ✅ should be return key

✅ src/test/roles.decorator.spec.ts

Roles decorator
  ✅ should be defined
  ✅ should be return key

✅ src/test/sorting.decorator.spec.ts

Sorting Decorator
  ✅ should return empty array if no sort query params are provided
  ✅ should return the correct fields and order from query params
  ✅ should throw BadRequestException if sort parameter format is invalid
  ✅ should throw BadRequestException if field is not included in validParams
  ✅ should throw BadRequestException if validParams is not an array
  ✅ should throw BadRequestException if sort parameter is in incorrect format
  ✅ should throw BadRequestException if sort direction is not "asc" or "desc"

✅ src/test/sorting.dto.spec.ts

Sorting Dto › SortCriteriaDto
  ✅ should validate a valid SortCriteriaDto
  ✅ should not validate an invalid SortCriteriaDto
  ✅ should set default order value if missing
Sorting Dto › SortingParamsDto
  ✅ should validate a valid SortingParamsDto
  ✅ should not validate an invalid SortingParamsDto
  ✅ should validate an empty fields array

✅ src/test/utils.spec.ts

Utils › getSkipHealthChecks
  ✅ should return an array of values when _value is not empty
  ✅ should handle spaces and different cases
  ✅ should return an empty array when _value is empty
  ✅ should return an empty array when _value is undefined
Utils › calculatePagination
  ✅ should calculate pagination metadata when there is a next and previous page
  ✅ should calculate pagination metadata when there is no next page
  ✅ should calculate pagination metadata when there is no previous page
  ✅ should calculate pagination metadata when there is only one page

✅ packages/dynamoose/junit.xml

27 tests were completed in 6s with 27 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/dynamoose.decorator.spec.ts 1✅ 808ms
src/test/dynamoose.module.spec.ts 15✅ 3s
src/test/dynamoose.provider.spec.ts 9✅ 723ms
src/test/myModule.module.spec.ts 2✅ 930ms

✅ src/test/dynamoose.decorator.spec.ts

Decorator › InjectModel
  ✅ should call Inject with correct token

✅ src/test/dynamoose.module.spec.ts

DynamooseModule › Basic configuration › forRoot
  ✅ should return a dynamic module
  ✅ should create a module with forRoot method
DynamooseModule › Basic configuration › forRootAsync
  ✅ should return a dynamic module
  ✅ should create a module with forRootAsync method
DynamooseModule › Basic configuration › forFeature
  ✅ should return a dynamic module empty
  ✅ should return a dynamic module
  ✅ should provide and export dynamoose providers
  ✅ should create a module with forFeature method
DynamooseModule › Basic configuration › forFeatureAsync
  ✅ should return a dynamic module empty
  ✅ should return a dynamic module
  ✅ should provide and export dynamoose async providers
  ✅ should create a module with forFeatureAsync method
DynamooseModule › Basic configuration › providers
  ✅ should create dynamoose providers
  ✅ should create async dynamoose providers
DynamooseModule › Advance configuration
  ✅ should be defined

✅ src/test/dynamoose.provider.spec.ts

Providers › createDynamooseProviders
  ✅ should create providers with no models
  ✅ should create providers with no models array
  ✅ should create providers with models and no serializers
  ✅ should create providers with models and serializers
Providers › createDynamooseAsyncProviders
  ✅ should create async providers with no factories
  ✅ should create async providers with no factories array
  ✅ should return an empty array if no model factories are provided
  ✅ should create async providers with factories returning schema
  ✅ should create async providers with factories returning ModelDefinition

✅ src/test/myModule.module.spec.ts

MyModule › DynamooseModule - forRoot
  ✅ should be defined
MyModule › DynamooseModule - forRootAsync
  ✅ should be defined

✅ packages/elk/junit.xml

22 tests were completed in 29s with 22 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/elk.interceptor.spec.ts 14✅ 19s
src/test/elk.module.spec.ts 8✅ 9s

✅ src/test/elk.interceptor.spec.ts

ElkInterceptor › With indexDate
  ✅ should be an ElkInterceptor instance to be defined
  ✅ should be return client ref
  ✅ should be create document in elasticsearch when return success string
  ✅ should be create document in elasticsearch when return success object
  ✅ should be create document in elasticsearch when return success with parameters
  ✅ should be create document in elasticsearch when return exception
  ✅ should be create document in elasticsearch when return exception http
ElkInterceptor › Without indexDate
  ✅ should be an ElkInterceptor instance to be defined
  ✅ should be return client ref
  ✅ should be create document in elasticsearch when return success string
  ✅ should be create document in elasticsearch when return success object
  ✅ should be create document in elasticsearch when return success with parameters
  ✅ should be create document in elasticsearch when return exception
  ✅ should be create document in elasticsearch when return exception http

✅ src/test/elk.module.spec.ts

ElkModule › With indexDate › forRoot
  ✅ should be defined
  ✅ should be return client ref
ElkModule › With indexDate › register
  ✅ should be defined
  ✅ should be return client ref
ElkModule › Without indexDate › forRoot
  ✅ should be defined
  ✅ should be return client ref
ElkModule › Without indexDate › register
  ✅ should be defined
  ✅ should be return client ref

✅ packages/filters/junit.xml

15 tests were completed in 9s with 15 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/error.utils.spec.ts 3✅ 1s
src/test/exceptions.filter.spec.ts 12✅ 7s

✅ src/test/error.utils.spec.ts

error.utils
  ✅ should be return code in string
  ✅ should be return code in string obj
  ✅ should be return code in string

✅ src/test/exceptions.filter.spec.ts

filters › code exception
  ✅ should map a regular code exception
filters › HttpExceptions › Default HttpExceptions
  ✅ should map default exception when thrown with not parameters
  ✅ should map default exception when thrown with error details
  ✅ should map default exception when thrown with error details and description
  ✅ should map HttpException response when called with an object
filters › HttpExceptions › Generic HttpException
  ✅ should map HttpException response when called with a string
  ✅ should map HttpException response when called with an object
  ✅ should map HttpException response when called with an object with empty message
  ✅ should map HttpException response when called with an array
filters › when used outside a module
  ✅ should map default exception when thrown with not parameters
filters › configuration is defined with values
  ✅ should be return application info
filters › Exclude Paths
  ✅ should exclude paths correctly

✅ packages/health/junit.xml

10 tests were completed in 12s with 10 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/constants.spec.ts 1✅ 641ms
src/test/health.module.spec.ts 1✅ 2s
src/test/liveness.controller.spec.ts 2✅ 841ms
src/test/readiness.controller.spec.ts 6✅ 9s

✅ src/test/constants.spec.ts

healthConstants
  ✅ should be return exclude to prefix global

✅ src/test/health.module.spec.ts

HealthModule
  ✅ should be define

✅ src/test/liveness.controller.spec.ts

LivenessController
  ✅ should be defined
  ✅ should be return up liveness

✅ src/test/readiness.controller.spec.ts

ReadinessController › Simple config
  ✅ should be defined with simple config
  ✅ should return up services with simple config
  ✅ should return down services with simple config
ReadinessController › Extend config
  ✅ should be defined with extend config
  ✅ should return up services with extend config
  ✅ should return down services with extend config

✅ packages/http-client/junit.xml

22 tests were completed in 13s with 22 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/http.interceptor.spec.ts 2✅ 920ms
src/test/http.module.spec.ts 7✅ 8s
src/test/http.service.spec.ts 13✅ 4s

✅ src/test/http.interceptor.spec.ts

HttpInterceptor
  ✅ should be defined
  ✅ should be intercept and pass headers

✅ src/test/http.module.spec.ts

HttpClientModule › HttpClientModule - global › global - with config
  ✅ should be define
HttpClientModule › HttpClientModule - global › global
  ✅ should be define
HttpClientModule › HttpClientModule.register › register - with config
  ✅ should be define
HttpClientModule › HttpClientModule.register › register
  ✅ should be define
HttpClientModule › HttpClientModule.registerAsync › useFactory
  ✅ should be define
HttpClientModule › HttpClientModule.registerAsync › useClass
  ✅ should be define
HttpClientModule › HttpClientModule.registerAsync › useExisting
  ✅ should be define

✅ src/test/http.service.spec.ts

HttpService
  ✅ should be defined
  ✅ should be return status 200 - request
  ✅ should be return status 200 - request with initAxios
  ✅ should be return status 200 - request
  ✅ should be return status 200 - request with params
  ✅ should be return status 200 - get
  ✅ should be return status 201 - post
  ✅ should be return status 200 - get by id
  ✅ should be return status 200 - put
  ✅ should be return status 200 - delete
  ✅ should be return status 200 - patch
  ✅ should be return status 200 - head
  ✅ should be return error

✅ packages/mailer/junit.xml

27 tests were completed in 9s with 27 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/mailer.module.spec.ts 2✅ 950ms
src/test/mailer.service.spec.ts 25✅ 8s

✅ src/test/mailer.module.spec.ts

MailerModule › forRoot
  ✅ should be defined
MailerModule › forRootAsync
  ✅ should be defined

✅ src/test/mailer.service.spec.ts

MailerService
  ✅ should not be defined if a transport is not provided
  ✅ should accept a smtp transport string
  ✅ should accept a smtp transports string
  ✅ should accept smtp transport options
  ✅ should accept a smtp transport instance
  ✅ should send emails with nodemailer
  ✅ should send emails with nodemailer transports
  ✅ should send emails with nodemailer with different transports name
  ✅ should send emails with nodemailer without transports
  ✅ should use mailerOptions.defaults when send emails
  ✅ should use custom transport to send mail
  ✅ should compile template with the handlebars adapter
  ✅ should compile template with the handlebars adapter with relative path
  ✅ should compile template with the handlebars adapter with error template path
  ✅ should compile template with the handlebars adapter with disabled inline-css
  ✅ should compile template with the handlebars adapter with enabled inline-css and media query
  ✅ should compile template with the pug adapter
  ✅ should compile template with the pug adapter with relative path
  ✅ should compile template with the pug adapter with error to read template
  ✅ should compile template with the pug adapter without inline css
  ✅ should compile template with the ejs adapter
  ✅ should compile template with the ejs adapter with error to read template
  ✅ should compile template with the ejs adapter read template relative url
  ✅ should compile template with the ejs adapter without css inline
  ✅ should compile template with the ejs adapter with css inline

✅ packages/paas/junit.xml

No tests found

✅ packages/qrcode/junit.xml

29 tests were completed in 8s with 29 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/qr-code.module.spec.ts 2✅ 337ms
src/test/qr-code.service.spec.ts 27✅ 8s

✅ src/test/qr-code.module.spec.ts

QrCodeModule
  ✅ should be defined
  ✅ should provide QrCodeService

✅ src/test/qr-code.service.spec.ts

QrCodeService
  ✅ should be defined
QrCodeService › Base64
  ✅ should handle text QR code data
  ✅ should handle text QR code data with options
  ✅ should handle url QR code data
  ✅ should handle wifi QR code data
  ✅ should handle vcard QR code data
  ✅ should handle email QR code data
  ✅ should handle sms QR code data
  ✅ should handle whatsapp QR code data
  ✅ should handle geo QR code data
  ✅ should handle event QR code data
  ✅ should handle crypto QR code data
  ✅ should throw an error for an invalid QR code type
  ✅ should throw an error for an invalid URL
QrCodeService › Buffer
  ✅ should handle text QR code data [Buffer]
  ✅ should handle text QR code data with options [Buffer]
  ✅ should handle url QR code data [Buffer]
  ✅ should handle wifi QR code data [Buffer]
  ✅ should handle vcard QR code data [Buffer]
  ✅ should handle email QR code data [Buffer]
  ✅ should handle sms QR code data [Buffer]
  ✅ should handle whatsapp QR code data [Buffer]
  ✅ should handle geo QR code data [Buffer]
  ✅ should handle event QR code data [Buffer]
  ✅ should handle crypto QR code data [Buffer]
  ✅ should throw an error for an invalid QR code type [Buffer]
  ✅ should throw an error for an invalid URL [Buffer]

✅ packages/rate-limit/junit.xml

1 tests were completed in 6s with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/rateLimit.module.spec.ts 1✅ 6s

✅ src/test/rateLimit.module.spec.ts

RateLimitModule › Global
  ✅ should be defined

✅ packages/redis/junit.xml

16 tests were completed in 13s with 16 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/redis.module.spec.ts 3✅ 8s
src/test/redis.service.spec.ts 13✅ 5s

✅ src/test/redis.module.spec.ts

RedisModule › with auth › forRootAsync
  ✅ should be defined
RedisModule › with auth › register
  ✅ should be defined
RedisModule › without auth
  ✅ should be defined

✅ src/test/redis.service.spec.ts

RedisService
  ✅ should be defined
  ✅ should be return echo
  ✅ should be return false if key dont exist in redis
  ✅ should be return OK when set value in redis
  ✅ should be return value of key
  ✅ should be return true if key exist in redis
  ✅ should be set value in redis with expiration date
  ✅ should be return true when copy key
  ✅ should be return false when copy key
  ✅ should be rename a key
  ✅ should be return false when delete a key
  ✅ should be return true when delete a key
  ✅ should be flush all

✅ packages/response-parser/junit.xml

5 tests were completed in 3s with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/response.interceptor.spec.ts 5✅ 3s

✅ src/test/response.interceptor.spec.ts

ResponseInterceptor
  ✅ should be defined
  ✅ should not propagate headers if no headers are specified in config
  ✅ should propagate headers from request to response
  ✅ should wrap an array response in a data object
  ✅ should not wrap non-array responses

✅ packages/snowflake-uid/junit.xml

19 tests were completed in 7s with 19 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/snowflake.module.spec.ts 2✅ 909ms
src/test/snowflake.service.spec.ts 17✅ 6s

✅ src/test/snowflake.module.spec.ts

SnowflakeModule
  ✅ should be defined
  ✅ should provide SnowflakeService

✅ src/test/snowflake.service.spec.ts

SnowflakeService
  ✅ should be defined
  ✅ should generate a snowflake ID as a string
  ✅ should generate a snowflake ID as a bigint
  ✅ should validate a valid snowflake ID
  ✅ should not validate an invalid snowflake ID
  ✅ should parse a snowflake ID correctly
  ✅ should throw an error if the system clock is invalid
  ✅ should throw an error if the timestamp is before epoch
  ✅ should throw an error if workerId is out of range
  ✅ should throw an error if processId is out of range
  ✅ should return false if workerId is out of range in isSnowflake
  ✅ should return false if processId is out of range in isSnowflake
  ✅ should return false if sequence is out of range in isSnowflake
  ✅ should wait until next millis if sequence overflows
  ✅ should reset sequence if timestamp advances
  ✅ should throw an error if workerId is not defined
  ✅ should throw an error if processId is not defined

✅ packages/test-utils/junit.xml

39 tests were completed in 114s with 39 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/config.spec.ts 3✅ 858ms
src/test/createMock.spec.ts 9✅ 950ms
src/test/fixtures.spec.ts 8✅ 803ms
src/test/globalTestContainers.spec.ts 3✅ 20s
src/test/testcontainer.spec.ts 13✅ 81s
src/test/utils.spec.ts 3✅ 11s

✅ src/test/config.spec.ts

Config › baseConfig
  ✅ should be return config
Config › dynamicConfig
  ✅ should be return config with args
  ✅ should be return config without args

✅ src/test/createMock.spec.ts

createMock
  ✅ should mock a GET request
  ✅ should mock a POST request with body
  ✅ should mock a PUT request with body
  ✅ should mock a PATCH request with body
  ✅ should mock a DELETE request
  ✅ should create a POST mock with the provided request body as Buffer
  ✅ should mock a request with function as responseBody
  ✅ should mock with query parameters
  ✅ should handle options with headers

✅ src/test/fixtures.spec.ts

Fixtures › appConfigBase
  ✅ should be return appBaseConfig
Fixtures › manifest
  ✅ should be return appBaseConfig
Fixtures › TestContainers options
  ✅ should be define Redis options
  ✅ should be define DynamoDB options
  ✅ should be define MongoDB options
  ✅ should be define MySql options
  ✅ should be define Postgres options
  ✅ should be define ElasticSearch options

✅ src/test/globalTestContainers.spec.ts

globalTestContainers
  ✅ should be initialize service from docker-compose.yml
  ✅ should be initialize all services from docker-compose.yml
  ✅ should be initialize services from docker-compose.yml in default path and filename

✅ src/test/testcontainer.spec.ts

TestContainers › Redis
  ✅ should be defined
  ✅ should be return exception of instance
  ✅ should be get instance of test container
  ✅ should be return envs of instance
  ✅ should be return container instance
  ✅ should be return host of container instance
  ✅ should be return name of container instance
  ✅ should be return mapped port
TestContainers › DynamoDB
  ✅ should be defined
TestContainers › MongoDB
  ✅ should be defined
TestContainers › MySql
  ✅ should be defined
TestContainers › Postgres
  ✅ should be defined
TestContainers › ElasticSearch
  ✅ should be defined

✅ src/test/utils.spec.ts

utilities
  ✅ should be return delay default time
  ✅ should be return delay custom time
  ✅ should be return a join of paths

✅ packages/tracing/junit.xml

6 tests were completed in 9s with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/app-tracing.spec.ts 6✅ 9s

✅ src/test/app-tracing.spec.ts

Tracing
  ✅ should be defined
  ✅ should be intercept and pass headers
  ✅ GET /cats
  ✅ GET /cats/1
  ✅ GET /cats/100
  ✅ GET /all-cats

✅ packages/typeorm/junit.xml

6 tests were completed in 19s with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/typeorm.module.spec.ts 6✅ 19s

✅ src/test/typeorm.module.spec.ts

TypeOrm › Postgres
  ✅ should be defined
  ✅ should be return an array of post
TypeOrm › MySql
  ✅ should be defined
  ✅ should be return an array of post
TypeOrm › Mongo
  ✅ should be defined
  ✅ should be return an array of user

✅ packages/utils/junit.xml

41 tests were completed in 36s with 41 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/bcrypt.module.spec.ts 1✅ 921ms
src/test/bcrypt.service.spec.ts 10✅ 30s
src/test/format.service.spec.ts 21✅ 3s
src/test/redact.module.spec.ts 6✅ 1s
src/test/redact.service.spec.ts 3✅ 834ms

✅ src/test/bcrypt.module.spec.ts

BcryptModule
  ✅ should be defined

✅ src/test/bcrypt.service.spec.ts

BcryptService
  ✅ should be defined
  ✅ should generate a new salt with default options
  ✅ should generate a new salt with custom options
  ✅ should encrypt and decrypt data correctly
  ✅ should encrypt and decrypt data synchronously
  ✅ should generate password hash and validate hash correctly
  ✅ should throw an error if encryption fails
  ✅ should throw an error if decryption fails
  ✅ should throw an error if password hashing fails
  ✅ should throw an error if hash validation fails

✅ src/test/format.service.spec.ts

FormatService › formatNumber
  ✅ should be defined
  ✅ should format a number correctly with no options and no locale
  ✅ should format a number correctly with no options
  ✅ should format a number correctly with ars currency options
  ✅ should format a number correctly with currency options
  ✅ should format a number correctly with percent options
  ✅ should format a number correctly with km units options
  ✅ should format a number correctly with litres units options
FormatService › formatDate
  ✅ should be defined
  ✅ should format date with ref of DateTime
  ✅ should format date correctly with default configs
  ✅ should format date correctly with only timezone
  ✅ should format date correctly with only format date
  ✅ should format date correctly with format date and timezone
  ✅ should format date correctly with format date, timezone and locale
  ✅ should format date correctly to ISO with default configs
  ✅ should format date correctly to ISO with only timezone
  ✅ should calculate diff between two timestamps in milliseconds
  ✅ should calculate diff between two timestamps in milliseconds with suffix
  ✅ should calculate diff between two timestamps in seconds
  ✅ should calculate diff between two timestamps in seconds with suffix

✅ src/test/redact.module.spec.ts

RedactModule › default
  ✅ should define the REDACT_PROVIDER
  ✅ should define the REDACT_PROVIDER with configModule
RedactModule › register
  ✅ should provide the REDACT_PROVIDER
  ✅ should provide the REDACT_PROVIDER values empty
RedactModule › registerAsync
  ✅ should provide the REDACT_PROVIDER using useFactory
  ✅ should provide the REDACT_PROVIDER using useClass

✅ src/test/redact.service.spec.ts

RedactService
  ✅ should be defined
  ✅ should be obfuscate sensitive data
  ✅ should be obfuscate sensitive data with serialize