Test Results

Summary

Status: ✅ All tests passed

Total Tests: 101

Passed: 101

Failed: 0

Skipped: 0

Duration: 0ms

Run at: 9/15/2025, 6:29:39 PM

toast_manager.test (undefined/undefined passed)
✅ given default initialization when creating instance then should create instance with default configuration
✅ given custom configuration options when initializing with custom config then should accept configuration
✅ given custom configuration options when initializing with maxToasts limit then should respect maxToasts configuration
✅ given custom configuration options when initializing with different positions then should handle all position options
✅ given default initialization when showing basic message then should return toast ID and create element
✅ given default initialization when generating multiple toasts then should generate unique toast IDs
✅ given toast type methods when showing different toast types then should handle all types
✅ given custom duration settings when showing toast with custom duration then should handle custom duration
✅ given custom duration settings when showing persistent toast with zero duration then should handle persistent toast
✅ given toast type methods when calling success method then should show success toast
✅ given toast type methods when calling error method then should show error toast
✅ given toast type methods when calling warning method then should show warning toast
✅ given toast type methods when calling info method then should show info toast
✅ given default initialization when configuring settings then should not throw error
✅ given toast removal operations when removing specific toast then should remove without error
✅ given toast removal operations when clearing all toasts then should clear all without error
✅ given default factory usage when creating instance then should create ToastManager instance
✅ given default factory usage when creating multiple instances then should create independent instances
✅ given custom configuration when creating with custom config then should create ToastManager with configuration
state_manager.test (undefined/undefined passed)
✅ given a new StateManager instance when created with initial state then should return cloned initial state
✅ given a StateManager with simple state when updating state with function updater then should apply changes correctly
✅ given a StateManager with simple state when updating partial state then should preserve other properties
✅ given a StateManager with complex nested state when updating nested properties then should handle complex updates correctly
✅ given a StateManager with persistence enabled when state is updated and new instance is created then should restore persisted state
✅ given a StateManager with persistence enabled when localStorage throws errors then should handle gracefully
✅ given a StateManager with subscribers when state changes then should notify all subscribers
✅ given a StateManager with subscriber when subscriber unsubscribes then should not receive further notifications
✅ given a StateManager when multiple subscribers exist then should notify all of them
✅ given the StateManager constructor when called with initial state then should create StateManager instance
✅ given the StateManager constructor when called with persistence options then should create StateManager with persistence
matchSimulator.test (undefined/undefined passed)
✅ given newly created match simulator when getting initial state then should return correct starting values
✅ given match simulator with different team configurations when getting state then should maintain team configurations
✅ given match simulator with different tactical setups when getting state then should maintain tactical variations
✅ given simulated match when getting final state then should track player lineups
✅ given valid teams when simulating entire match then should complete at full time
✅ given valid teams when simulating match then should produce match events
✅ given valid teams when simulating match then should advance through match phases
✅ given valid teams when simulating match then should process events correctly
✅ given valid teams when simulating match then should track match statistics
✅ given valid teams when simulating match then should finish at full time
✅ given simulated match when getting events then should handle events correctly
✅ given valid teams when creating match simulator then should create without error
✅ given valid teams when creating simulator then should return valid instance
✅ given valid teams when creating multiple simulators then should create independent instances
✅ given teams with different formations when creating simulator then should accept different formations
timeline.test (undefined/undefined passed)
✅ given a timeline with a registered moment when retrieving moments for the date then should return the registered moment
✅ given a timeline with multiple moments on the same date when retrieving moments for that date then should return all moments
✅ given a timeline with a registered moment when removing the moment by id then should return true and remove the moment
✅ given an empty timeline when removing a non-existent moment then should return false
✅ given a timeline with a registered moment when manually resolving the moment then should mark the moment as resolved
✅ given a timeline with a future moment when advancing time to reach the moment then should trigger the moment
✅ given a timeline with a future moment when advancing time to the exact date then should return the moment
✅ given a timeline with multiple moments on different dates when advancing time past all moments then should return moments in chronological order
✅ given a timeline with an already resolved moment when advancing time then should not trigger the resolved moment
✅ given a timeline with a past moment when advancing time then should not trigger the past moment
✅ given an empty timeline when advancing time then should return no triggered moments
✅ given a timeline with a specific start date when getting the current date then should return the start date
✅ given a timeline with a specific start date when advancing time then should update the current date
✅ given a timeline with no start date specified when creating the timeline then should have a default current date
name_generator.test (undefined/undefined passed)
✅ given a Norwegian male name generator when generating a name then should use Norwegian male and Norwegian last names
✅ given a Norwegian female name generator when generating a name then should use Norwegian female and Norwegian last names
✅ given an English male name generator when generating a name then should use English male and English last names
✅ given a name generator with all genders and countries when generating unique names then should return requested number of unique names
✅ given a male name generator with all countries when generating names then should use names from both Norwegian and English data
✅ given a female English name generator when getting configuration then should return correct gender and country
✅ given an unsupported country when creating a name generator then should throw an error
eventBus.test (undefined/undefined passed)
✅ given listener registered for event when event is emitted then should execute callback with correct data
✅ given multiple listeners registered for same event when event is emitted then should execute all callbacks
✅ given same listener registered multiple times when event is emitted then should execute listener multiple times
✅ given no listeners for event when event is emitted then should not throw error
✅ given listener registered and then removed when event is emitted then should not execute callback
✅ given same listener registered multiple times and off called once when event is emitted then should only remove first instance of listener
playerGenerator.test (undefined/undefined passed)
✅ given default configuration when generating a single player then should have correct properties
✅ given default configuration when generating a player then should have attributes within valid range
✅ given custom attribute range when generating a player then should respect the configured range
✅ given default configuration when generating players for different positions then should adjust attributes based on position
✅ given gender and country when constructing player generator then should generate names accordingly
uuid.test (undefined/undefined passed)
✅ given Uuid class when calling v4 then should return valid UUID v4 string
✅ given Uuid class when calling v4 multiple times then should return unique UUIDs
✅ given Uuid class when instantiated then should throw error
✅ given v4 function when called then should return valid UUID v4 string
✅ given v4 function when called multiple times then should return unique UUIDs
✅ given v4 function when called then should return UUID with correct format (8-4-4-4-12)
✅ given generated UUID when checking version then should have version 4 identifier
✅ given generated UUID when checking variant then should have correct variant bits
✅ given 1000 generated UUIDs when checking version and variant then should all be compliant
✅ given generated UUIDs when checking format then should match RFC 4122 pattern
✅ given 100 UUIDs when generated then should all be unique
✅ given 10000 UUIDs when generated then should all be unique
✅ given generated UUIDs when analyzing character distribution then should have good entropy
✅ given crypto available when generating UUID then should use crypto.getRandomValues
✅ given crypto not available when generating UUID then should use Math.random fallback
✅ given crypto not available when generating multiple UUIDs then should warn only once
✅ given Math.random fallback when generating UUIDs then should still produce unique results
✅ given valid UUID v4 strings when validating then should pass validation
✅ given invalid UUID strings when validating then should fail validation
✅ given UUID strings in different cases when validating then should pass validation regardless of case
✅ given non-string values when validating then should fail validation
✅ given high volume generation when generating 1000 UUIDs then should complete quickly and all be unique
✅ given continuous generation when generating 10000 UUIDs then should maintain performance
✅ given repeated calls when generating many UUIDs then should not cause memory leaks