# TestEnvironmentConfig interface  
Configuration of the unit testing environment, including emulators.

**Signature:**

```typescript
export interface TestEnvironmentConfig
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [database](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.testenvironmentconfig.md#testenvironmentconfigdatabase/index.html) | [EmulatorConfig](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.md#emulatorconfig/index.html) | The Database emulator. Its host and port can also be discovered automatically through the hub (see field "hub") or specified via the environment variable FIREBASE_DATABASE_EMULATOR_HOST. |
| [firestore](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.testenvironmentconfig.md#testenvironmentconfigfirestore/index.html) | [EmulatorConfig](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.md#emulatorconfig/index.html) | The Firestore emulator. Its host and port can also be discovered automatically through the hub (see field "hub") or specified via the environment variable FIRESTORE_EMULATOR_HOST. |
| [hub](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.testenvironmentconfig.md#testenvironmentconfighub/index.html) | [HostAndPort](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.hostandport.md#hostandport_interface/index.html) | The Firebase Emulator hub. Can also be specified via the environment variable FIREBASE_EMULATOR_HUB. If specified either way, other running emulators can be automatically discovered, and thus do not to be explicity specified. |
| [projectId](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.testenvironmentconfig.md#testenvironmentconfigprojectid/index.html) | string | The project ID of the test environment. Can also be specified via the environment variable GCLOUD_PROJECT. A "demo-*" project ID is strongly recommended, especially for unit testing. See: https://firebase.google.com/docs/emulator-suite/connect_firestore#choose_a_firebase_project |
| [storage](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.testenvironmentconfig.md#testenvironmentconfigstorage/index.html) | [EmulatorConfig](/content/docs/reference/emulator-suite/rules-unit-testing/rules-unit-testing.md#emulatorconfig/index.html) | The Storage emulator. Its host and port can also be discovered automatically through the hub (see field "hub") or specified via the environment variable FIREBASE_STORAGE_EMULATOR_HOST. |

## TestEnvironmentConfig.database

The Database emulator. Its host and port can also be discovered automatically through the hub (see field "hub") or specified via the environment variable FIREBASE_DATABASE_EMULATOR_HOST.

**Signature:**

```typescript
database?: EmulatorConfig;
```

## TestEnvironmentConfig.firestore

The Firestore emulator. Its host and port can also be discovered automatically through the hub (see field "hub") or specified via the environment variable FIRESTORE_EMULATOR_HOST.

**Signature:**

```typescript
firestore?: EmulatorConfig;
```

## TestEnvironmentConfig.hub

The Firebase Emulator hub. Can also be specified via the environment variable FIREBASE_EMULATOR_HUB. If specified either way, other running emulators can be automatically discovered, and thus do not to be explicity specified.

**Signature:**

```typescript
hub?: HostAndPort;
```

## TestEnvironmentConfig.projectId

The project ID of the test environment. Can also be specified via the environment variable GCLOUD_PROJECT.

A "demo-*" project ID is strongly recommended, especially for unit testing. See: https://firebase.google.com/docs/emulator-suite/connect_firestore#choose_a_firebase_project

**Signature:**

```typescript
projectId?: string;
```

## TestEnvironmentConfig.storage

The Storage emulator. Its host and port can also be discovered automatically through the hub (see field "hub") or specified via the environment variable FIREBASE_STORAGE_EMULATOR_HOST.

**Signature:**

```typescript
storage?: EmulatorConfig;
```
