---
lang: en
title: 'API docs: repository-tests'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository-tests
permalink: /doc/en/lb4/apidocs.repository-tests.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository-tests](./repository-tests.md)

## repository-tests package

A test suite verifying functionality of `@loopback/repository` in a connector -independent way.

## Remarks

Test-suite factories to define standardized test suite capable of testing any combination of a Repository class and a corresponding connector, for example DefaultCrudRepository with connectors like memory, MySQL and MongoDB.

## Functions

<table><thead><tr><th>

Function


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[crudRepositoryTestSuite(dataSourceOptions, repositoryClass, partialFeatures)](./repository-tests.crudrepositorytestsuite.md)


</td><td>


</td></tr>
</tbody></table>

## Interfaces

<table><thead><tr><th>

Interface


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[CrudFeatures](./repository-tests.crudfeatures.md)


</td><td>

List of flags describing behavior specific to different connectors and repository implementations. These flags are used by the test suite to tweak assertions and skip tests for scenarios not supported by some implementations.


</td></tr>
</tbody></table>

## Type Aliases

<table><thead><tr><th>

Type Alias


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[CrudRepositoryCtor](./repository-tests.crudrepositoryctor.md)


</td><td>

A constructor of a class implementing CrudRepository interface, accepting the Entity class (constructor) and a dataSource instance.


</td></tr>
<tr><td>

[DataSourceOptions](./repository-tests.datasourceoptions.md)


</td><td>

DataSource configuration (connector name, connection string, etc.).


</td></tr>
<tr><td>

[TransactionalRepositoryCtor](./repository-tests.transactionalrepositoryctor.md)


</td><td>

A constructor of a class implementing TransactionalRepository interface, accepting the Entity class (constructor) and a dataSource instance.


</td></tr>
</tbody></table>

