@inrupt/solid-client / acl/mock

Module: acl/mock#

Functions#

addMockFallbackAclTo#

addMockFallbackAclTo<T>(resource): T & WithFallbackAcl

Warning

Do not use this function in production code. For use in unit tests that require a [[SolidDataset]] with a fallback ACL (Access Control List).

Initialises a new empty fallback ACL and attaches it to a given SolidDataset for use in unit tests; e.g., unit tests that call getFallbackAcl.

Since

0.2.0

Type parameters#

Name

Type

T

extends WithServerResourceInfo

Parameters#

Name

Type

Description

resource

T

The Resource to mock up with new fallback ACL.

Returns#

T & WithFallbackAcl

The input Resource with an empty fallback ACL attached.

Defined in#

src/acl/mock.ts:86


addMockResourceAclTo#

addMockResourceAclTo<T>(resource): T & WithResourceAcl

Warning

Do not use this function in production code. For use in unit tests that require a [[SolidDataset]] with a resource ACL (Access Control List).

Initialises a new empty ACL and attaches it to a given SolidDataset for use in unit tests; e.g., unit tests that call getResourceAcl.

Since

0.2.0

Type parameters#

Name

Type

T

extends WithServerResourceInfo

Parameters#

Name

Type

Description

resource

T

The Resource to mock up with a new resource ACL.

Returns#

T & WithResourceAcl

The input Resource with an empty resource ACL attached.

Defined in#

src/acl/mock.ts:48