@ngxs/store
Version:
32 lines (26 loc) • 1.19 kB
TypeScript
import { Store, NgxsModuleOptions } from '@ngxs/store';
import { ModuleWithProviders } from '@angular/core';
import { TestBedStatic } from '@angular/core/testing';
import { ɵStateClass as _StateClass } from '@ngxs/store/internals';
declare function freshPlatform(fn: (done?: VoidFunction) => Promise<void>): () => Promise<void>;
interface NgxsOptionsTesting {
states?: _StateClass[];
ngxsOptions?: NgxsModuleOptions;
imports?: ModuleWithProviders<any>[];
before?: () => void;
}
interface NgxsTesting {
store: Store;
getTestBed: TestBedStatic;
}
declare class NgxsTestBed {
static configureTestingStates(options: NgxsOptionsTesting): NgxsTesting;
private static ngxsBootstrap;
private static resetTestBed;
private static createRootNode;
}
type ConsoleRecord = [string, any[]];
type ConsoleRecorder = ConsoleRecord[];
declare function loggedError(message: string): ConsoleRecord;
declare function skipConsoleLogging<T extends (...args: any[]) => any>(fn: T, consoleRecorder?: ConsoleRecorder): ReturnType<T>;
export { type ConsoleRecord, type ConsoleRecorder, NgxsTestBed, type NgxsTesting, freshPlatform, loggedError, skipConsoleLogging };