Skip to content

Instantly share code, notes, and snippets.

@taras
Created December 30, 2025 01:37
Show Gist options
  • Select an option

  • Save taras/67f4b0b00a646251ed6302741b257186 to your computer and use it in GitHub Desktop.

Select an option

Save taras/67f4b0b00a646251ed6302741b257186 to your computer and use it in GitHub Desktop.
➜ server git:(effection-v4) npm run test
> @simulacrum/server@0.7.2 test
> node --import tsx --test test/*.test.ts
process yielded
spawned logger
running wellnessCheck
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
﹣ test service (0.36225ms) # SKIP
▶ useService with wellness check
﹣ test with short wellness timeout (0.140958ms) # SKIP
﹣ test with long wellness timeout (0.040208ms) # SKIP
running wellness check operation
wellness check operation started
starting test service
wellness check got line: { line: 'starting test service' }
test service started
wellness check got line: { line: 'test service started' }
{
result: { ok: true },
options: {
wellnessCheck: {
timeout: 150,
frequency: 100,
operation: [GeneratorFunction: operation]
}
}
}
providing
✔ test with mid-frequency wellness timeout (159.774583ms)
✔ useService with wellness check (160.24525ms)
ℹ tests 4
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 317.071291
➜ server git:(effection-v4) npm run test
> @simulacrum/server@0.7.2 test
> node --import tsx --test test/*.test.ts
process yielded
spawned logger
running wellnessCheck
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
﹣ test service (0.356792ms) # SKIP
▶ useService with wellness check
﹣ test with short wellness timeout (0.1305ms) # SKIP
﹣ test with long wellness timeout (0.039125ms) # SKIP
running wellness check operation
wellness check operation started
starting test service
wellness check got line: { line: 'starting test service' }
test service started
wellness check got line: { line: 'test service started' }
{
result: { ok: true },
options: {
wellnessCheck: {
timeout: 150,
frequency: 100,
operation: [GeneratorFunction: operation]
}
}
}
providing
✔ test with mid-frequency wellness timeout (157.358167ms)
✔ useService with wellness check (157.797792ms)
ℹ tests 4
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 311.091708
➜ server git:(effection-v4) npm run test
> @simulacrum/server@0.7.2 test
> node --import tsx --test test/*.test.ts
process yielded
spawned logger
running wellnessCheck
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
﹣ test service (0.383708ms) # SKIP
▶ useService with wellness check
﹣ test with short wellness timeout (0.172042ms) # SKIP
﹣ test with long wellness timeout (0.042208ms) # SKIP
running wellness check operation
wellness check operation started
starting test service
wellness check got line: { line: 'starting test service' }
test service started
wellness check got line: { line: 'test service started' }
{
result: { ok: true },
options: {
wellnessCheck: {
timeout: 150,
frequency: 100,
operation: [GeneratorFunction: operation]
}
}
}
providing
✔ test with mid-frequency wellness timeout (154.026958ms)
✔ useService with wellness check (154.498375ms)
ℹ tests 4
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 305.384875
➜ server git:(effection-v4) npm run test
> @simulacrum/server@0.7.2 test
> node --import tsx --test test/*.test.ts
process yielded
spawned logger
running wellnessCheck
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
﹣ test service (0.398958ms) # SKIP
▶ useService with wellness check
﹣ test with short wellness timeout (0.161958ms) # SKIP
﹣ test with long wellness timeout (0.042708ms) # SKIP
running wellness check operation
wellness check operation started
starting test service
wellness check got line: { line: 'starting test service' }
test service started
wellness check got line: { line: 'test service started' }
{
result: { ok: true },
options: {
wellnessCheck: {
timeout: 150,
frequency: 100,
operation: [GeneratorFunction: operation]
}
}
}
providing
✔ test with mid-frequency wellness timeout (157.85175ms)
✔ useService with wellness check (158.335125ms)
ℹ tests 4
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 315.129958
➜ server git:(effection-v4) npm run test
> @simulacrum/server@0.7.2 test
> node --import tsx --test test/*.test.ts
process yielded
spawned logger
running wellnessCheck
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
﹣ test service (0.355125ms) # SKIP
▶ useService with wellness check
﹣ test with short wellness timeout (0.131333ms) # SKIP
﹣ test with long wellness timeout (0.04125ms) # SKIP
running wellness check operation
wellness check operation started
starting test service
wellness check got line: { line: 'starting test service' }
{
result: { exists: false },
options: {
wellnessCheck: {
timeout: 150,
frequency: 100,
operation: [GeneratorFunction: operation]
}
}
}
wellness check not ok, trying again
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
test service started
running wellness check operation
wellness check operation started
npm error Lifecycle script `test` failed with error:
npm error code 1
npm error path /Users/tarasmankovski/Repositories/frontside/simulacrum/packages/server
npm error workspace @simulacrum/server@0.7.2
npm error location /Users/tarasmankovski/Repositories/frontside/simulacrum/packages/server
npm error command failed
npm error command sh -c node --import tsx --test test/*.test.ts
➜ server git:(effection-v4) ps aux | grep "service-main" | grep -v grep
tarasmankovski 43726 0.0 0.1 467485728 80048 ?? Ss 8:36PM 0:00.21 node --import tsx ./test/service-main.ts
➜ server git:(effection-v4) pkill -f "service-main"
➜ server git:(effection-v4) npm run test
> @simulacrum/server@0.7.2 test
> node --import tsx --test test/*.test.ts
process yielded
spawned logger
running wellnessCheck
{ [Symbol(Symbol.iterator)]: [GeneratorFunction: [Symbol.iterator]] }
sleeping for 100ms before wellness check
﹣ test service (0.375875ms) # SKIP
▶ useService with wellness check
﹣ test with short wellness timeout (0.137041ms) # SKIP
﹣ test with long wellness timeout (0.0385ms) # SKIP
running wellness check operation
wellness check operation started
starting test service
wellness check got line: { line: 'starting test service' }
test service started
wellness check got line: { line: 'test service started' }
{
result: { ok: true },
options: {
wellnessCheck: {
timeout: 150,
frequency: 100,
operation: [GeneratorFunction: operation]
}
}
}
providing
✔ test with mid-frequency wellness timeout (156.770583ms)
✔ useService with wellness check (157.20925ms)
ℹ tests 4
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 311.445792
➜ server git:(effection-v4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment