@inrupt/solid-client

Globals / “acl/mock”

Module: “acl/mock”

Functions

addMockFallbackAclTo

addMockFallbackAclTo<T>(resource: T): T & WithFallbackAcl

Defined in src/acl/mock.ts:89

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

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.


addMockResourceAclTo

addMockResourceAclTo<T>(resource: T): T & WithResourceAcl

Defined in src/acl/mock.ts:48

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

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.