Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MockStorageService

A StorageService suitable to use during tests.

Hierarchy

  • MockStorageService

Implements

Index

Properties

Readonly data

data: Map<string, undefined | {}> = new Map<string, {} | undefined>()

Optional onSetDataCallback

onSetDataCallback: undefined | ((key: string, data?: any) => void)

Methods

getData

  • getData<T>(key: string, defaultValue?: T): Promise<T | undefined>

onSetData

  • onSetData(callback: (key: string, data?: any) => void): void

setData

  • setData<T>(key: string, data?: T): Promise<void>