Skip to content

FakeNotificationRuntime — @gj-kit/nest-notifications

A public interface from @gj-kit/nest-notifications/testing. The signature below is taken directly from the 0.1.1 release declaration.

import { FakeNotificationRuntime } from '@gj-kit/nest-notifications/testing';
/**
* 결정적 런타임 — 시계·claim 토큰·defer를 전부 테스트가 소유한다.
*
* 소스의 wakeup 스펙은 실제로 `realSetTimeout(5ms)`로 기다렸다. 여기서는 `flush()`가 그
* 대기를 없앤다 — 그것이 `defer`를 포트로 만든 이유이기도 하다(설계 §0.2-⑫).
*/
interface FakeNotificationRuntime extends NotificationRuntime {
/** Moves the clock forward. Deferred work is not run by this call. */
advance(ms: number): void;
/** Runs every deferred callback synchronously, including ones they enqueue. */
flush(): void;
}

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/nest-notifications
  • Version: 0.1.1
  • Public entry: ./testing
  • Source: GitHub