UNPKG

@inversifyjs/core

Version:

InversifyJs core package

86 lines 2.68 kB
import { bindingScopeValues } from '../models/BindingScope.js'; import { bindingTypeValues } from '../models/BindingType.js'; export class ConstantValueBindingFixtures { static get any() { return { cache: { isRight: false, value: undefined, }, id: 1, isSatisfiedBy: () => true, moduleId: undefined, onActivation: undefined, onDeactivation: undefined, scope: bindingScopeValues.Singleton, serviceIdentifier: 'service-id', type: bindingTypeValues.ConstantValue, value: Symbol.for('constant-value-binding-fixture-value'), }; } static get withCacheWithIsRightFalse() { return { ...ConstantValueBindingFixtures.any, cache: { isRight: false, value: undefined, }, }; } static get withCacheWithIsRightTrue() { return { ...ConstantValueBindingFixtures.any, cache: { isRight: true, value: Symbol.for('constant-value-binding-fixture-value'), }, }; } static get withOnActivationUndefined() { return { ...ConstantValueBindingFixtures.any, onActivation: undefined, }; } static get withCacheWithIsRightTrueOnDeactivationAsync() { return { ...ConstantValueBindingFixtures.any, onDeactivation: async () => undefined, }; } static get withCacheWithIsRightTrueAndAsyncValueAndOnDeactivationSync() { return { ...ConstantValueBindingFixtures.any, cache: { isRight: true, value: Promise.resolve(Symbol()), }, onDeactivation: () => undefined, }; } static get withCacheWithIsRightTrueAndOnDeactivationSync() { return { ...ConstantValueBindingFixtures.withCacheWithIsRightTrue, onDeactivation: () => undefined, }; } static get withCacheWithIsRightTrueAndOnDeactivationUndefined() { return { ...ConstantValueBindingFixtures.withCacheWithIsRightTrue, onDeactivation: undefined, }; } static get withModuleIdUndefined() { return { ...ConstantValueBindingFixtures.any, moduleId: undefined, }; } static get withModuleId() { return { ...ConstantValueBindingFixtures.any, moduleId: 1, }; } } //# sourceMappingURL=ConstantValueBindingFixtures.js.map