@nevware21/tripwire - v0.1.2
    Preparing search index...

    Interface IHasOp<R>

    Provides the 'has' operation for the assert scope.

    interface IHasOp<R> {
        all: IAllOp<R>;
        any: IAnyOp<R>;
        iterator: SymbolFn;
        own: IOwnOp<R>;
        property: PropertyFn;
        propertyDescriptor: PropertyDescriptorFn;
    }

    Type Parameters

    • R
    Index

    Properties

    all: IAllOp<R>

    Provides the all assertion operations.

    expect({ a: 1, b: 2 }).has.all.keys('a', 'b');
    
    any: IAnyOp<R>

    Provides the any assertion operations.

    expect({ a: 1, b: 2 }).has.any.keys('a', 'b');
    
    iterator: SymbolFn

    Asserts that the object has the Symbol.iterator property.

    expect({ [Symbol.iterator]: () => {} }).has.iterator();
    
    own: IOwnOp<R>

    Asserts that the object has the specified own property.

    expect({ a: 1, b: 2 }).has.own.property('a');
    
    property: PropertyFn

    Asserts that the object has the specified property.

    expect({ a: 1, b: 2 }).has.property('a');
    
    propertyDescriptor: PropertyDescriptorFn

    Asserts that the object has the specified property descriptor.

    expect({ a: 1, b: 2 }).has.propertyDescriptor('a');