@barry-rocks/sdk/testing
Test doubles for the Barry subjects: fakeIdentities, fakeSessions,
fakeActions, fakeEvents, fakeSchedules, fakeBags, fakeTracker, and
fakeServices. Install them with Barry.use() in a test and restore the real
ones with Barry.reset(). A method a fake doesn’t specify throws, so a test
fails loudly when it reaches past what it set up.
import { … } from "@barry-rocks/sdk/testing";Functions
Section titled “Functions”fakeActions()
Section titled “fakeActions()”fakeActions(
overrides?):Actions
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Actions> |
Returns
Section titled “Returns”fakeBags()
Section titled “fakeBags()”fakeBags(
overrides?):Bags
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Bags> |
Returns
Section titled “Returns”fakeEvents()
Section titled “fakeEvents()”fakeEvents(
overrides?):Events
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Events> |
Returns
Section titled “Returns”fakeIdentities()
Section titled “fakeIdentities()”fakeIdentities(
overrides?):Identities
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Identities> |
Returns
Section titled “Returns”fakeSchedules()
Section titled “fakeSchedules()”fakeSchedules(
overrides?):Schedules
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Schedules> |
Returns
Section titled “Returns”fakeServices()
Section titled “fakeServices()”fakeServices(
overrides?):Services
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Services> |
Returns
Section titled “Returns”fakeSessions()
Section titled “fakeSessions()”fakeSessions(
overrides?):Sessions
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Sessions> |
Returns
Section titled “Returns”fakeTracker()
Section titled “fakeTracker()”fakeTracker(
overrides?):Tracker
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
overrides |
Partial<Tracker> |