@inrupt/solid-client-authn-core

Globals / “storage/__mocks__/StorageUtility”

Module: “storage/__mocks__/StorageUtility”

Variables

StorageUtilityGetResponse

Const StorageUtilityGetResponse: “getResponse” = “getResponse”

Defined in storage/mocks/StorageUtility.ts:25

Functions

mockStorage

ConstmockStorage(stored: Record<string, string | Record<string, string>>): IStorage

Defined in storage/mocks/StorageUtility.ts:75

Parameters:

Name

Type

stored

Record<string, string | Record<string, string>>

Returns: IStorage


mockStorageUtility

ConstmockStorageUtility(stored: Record<string, string | Record<string, string>>, isSecure?: boolean): IStorageUtility

Defined in storage/mocks/StorageUtility.ts:93

Parameters:

Name

Type

Default value

stored

Record<string, string | Record<string, string>>

-

isSecure

boolean

false

Returns: IStorageUtility

Object literals

StorageUtilityMock

Const StorageUtilityMock: object

Defined in storage/mocks/StorageUtility.ts:30

Properties:

Name

Type

Value

delete

function

(key: string) => Promise<void>

deleteAllUserData

function

(userId: string, options?: undefined | { secure?: undefined | false | true }) => Promise<void>

deleteForUser

function

(userId: string, key: string, options?: undefined | { secure?: undefined | false | true }) => Promise<void>

get

function

(key: string, options?: undefined | { errorIfNull?: undefined | false | true }) => Promise<string>

getForUser

function

(userId: string, key: string, options?: undefined | { errorIfNull?: undefined | false | true ; secure?: undefined | false | true }) => Promise<string>

safeGet

function

(key: string, options?: Partial<{ postProcess?: undefined | (retrievedObject: any) => any ; schema?: Record<string, any> ; userId?: undefined | string }>) => Promise<{ someKey: string = “someValue” }>

set

function

(key: string, value: string) => Promise<void>

setForUser

function

(userId: string, values: Record<string, string>, options?: undefined | { secure?: undefined | false | true }) => Promise<void>


StorageUtilitySafeGetResponse

Const StorageUtilitySafeGetResponse: object

Defined in storage/mocks/StorageUtility.ts:26

Properties:

Name

Type

Value

someKey

string

“someValue”