MCPcopy Create free account
hub / github.com/activejs/activejs / createUnit

Function createUnit

packages/core/src/tests/persistence.spec.ts:52–57  ·  view source on GitHub ↗
(configOverride?: UnitConfig<any>)

Source from the content-addressed store, hash-verified

50 let unit: UnitBase<any>;
51
52 const createUnit = (configOverride?: UnitConfig<any>): UnitBase<any> => {
53 unitConfig = somewhatValidConfig(configOptions, unitCtor, 1);
54 unitConfig.id = randomString();
55 Object.assign(unitConfig, configOverride);
56 return (unit = new unitCtor(unitConfig));
57 };
58 const mockStorage = new MockStorage();
59
60 beforeEach(() => {

Callers 2

extras.spec.tsFile · 0.90

Calls 3

somewhatValidConfigFunction · 0.90
randomStringFunction · 0.90
assignMethod · 0.80

Tested by

no test coverage detected