GitHub

MockCollection

Mocked DaffCollection object.

It should be customized by passing the factory for the contained entity as the first constructor argument.

import { MockCollection } from '@daffodil/core/testing'
class MockCollection<<T extends DaffIdentifiable = DaffIdentifiable>>  implements DaffCollection<T> {
  metadata: this.createMetadata()
  data: daffIdentifiableArrayToDict(this._items)
}

Properties

Name Type Description
metadata this.createMetadata()
data daffIdentifiableArrayToDict(this._items)