Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/v9 #18

Merged
merged 47 commits into from
Jan 6, 2024

Uhm... lots of fixes and cleanups

9767049
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Feature/v9 #18

Uhm... lots of fixes and cleanups
9767049
Select commit
Loading
Failed to load commit list.
GitHub Actions / Tests succeeded Jan 6, 2024 in 0s

Tests ✅

Tests passed successfully

✅ ./nodejs/junit.json

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

Test suite Passed Failed Skipped Time
nodejs/src/tests/logger/logFormatter.ts 14✅ 2ms
nodejs/src/tests/plugins/events-default/plugin.ts 169✅ 548ms
nodejs/src/tests/plugins/logging-default/plugin.ts 23✅ 5ms

✅ nodejs/src/tests/logger/logFormatter.ts

logFormatter formatLog
  ✅ Should fail to format DT when a value found is inside an object
  ✅ Should format *null/undefined* when a value found doesnt exist
  ✅ Should format *null/undefined* when a value found is undefined
  ✅ Should format correctly
  ✅ Should format direct date
  ✅ Should format DT in ISO when a value found is a date
  ✅ Should format DT in ISO when a value found is a date 2
  ✅ Should format iso date
  ✅ Should format json when a value found is an array
  ✅ Should format json when a value found is an object
  ✅ Should return string when meta is a number
  ✅ Should return string when meta is a string
  ✅ Should return string when meta is null
  ✅ Should return string when meta is undefined

✅ nodejs/src/tests/plugins/events-default/plugin.ts

plugins/events-default Emit emitEvent
  ✅ only one plugin should receive the event
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should be able to emit to events with self multi-args
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Array
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Boolean false
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Boolean true
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Max Number
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Min Number
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Null
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent Object
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit emitEvent String
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default Emit onEvent
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitAndReturn emitEventAndReturn
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly
plugins/events-default EmitAndReturn emitEventAndReturn Array
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn Boolean false
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn Boolean true
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn DiffData
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn Max Number
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn Min Number
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn Null
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn Object
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitAndReturn emitEventAndReturn String
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
  ✅ should response error correctly
  ✅ should timeout correctly - general timeout
  ✅ should timeout correctly - no receipt
plugins/events-default EmitBroadcast emitBroadcast
  ✅ all plugins should receive the event
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should be able to emit to events with self multi-args
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Array
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Boolean false
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Boolean true
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Max Number
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Min Number
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Null
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast Object
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast emitBroadcast String
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitBroadcast onBroadcast
  ✅ should be able to emit to events with plugin name defined
  ✅ should be able to emit to events with self
  ✅ should not be able to emit to other events with plugin name defined
  ✅ should not be able to emit to other events with self
plugins/events-default EmitStreamAndReceiveStream
  ✅ receiveStream creates a should generate a valid string
  ✅ sendStream triggers receiveStream listener
  ✅ sendStream triggers timeout when no receiveStream setup
plugins/events-default EmitStreamAndReceiveStream sendStream triggers receiveStream files
  ✅ should be able to fully stream a file - 128KB
  ✅ should be able to fully stream a file - 16KB
  ✅ should be able to fully stream a file - 16MB
  ✅ should be able to fully stream a file - 1KB
  ✅ should be able to fully stream a file - 1MB
  ✅ should be able to fully stream a file - 512KB
plugins/events-default EmitStreamAndReceiveStream sendStream triggers receiveStream listener passing in the stream
  ✅ should call the listener with a stream
  ✅ should not call the listener with an error
plugins/events-default Events Emit
  ✅ _lastReceivedMessageIds should be empty on init
  ✅ _lastReceivedMessageIds should call only once
  ✅ _lastReceivedMessageIds should call only once, per id
  ✅ _lastReceivedMessageIds should contain latest emit ID
  ✅ _lastReceivedMessageIds should cycle ids > 50

✅ nodejs/src/tests/plugins/logging-default/plugin.ts

plugins/logging-default console mocked/overriden
  ✅ should mocked a debug event
  ✅ should mocked a debug event (meta)
  ✅ should mocked a error event
  ✅ should mocked a error event (meta)
  ✅ should mocked a info event
  ✅ should mocked a info event (meta)
  ✅ should mocked a stat event
  ✅ should mocked a warn event
  ✅ should mocked a warn event (meta)
plugins/logging-default console.x
  ✅ running debug, should debug everything
  ✅ running live-debug, should debug
  ✅ running non-debug, should not debug anything
  ✅ should console a debug event
  ✅ should console a debug event (meta)
  ✅ should console a error event
  ✅ should console a error event (meta)
  ✅ should console a info event
  ✅ should console a info event (meta)
  ✅ should console a stat event
  ✅ should console a text stat event
  ✅ should console a warn event
  ✅ should console a warn event (meta)
  ✅ Stack report