Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silent-planets-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/rules-unit-testing": patch
---

Allow using useEmulators() with only the storage configuration.
4 changes: 2 additions & 2 deletions packages/rules-unit-testing/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ export function initializeAdminApp(options: AdminAppOptions): app.App {
* @param options options object.
*/
export function useEmulators(options: FirebaseEmulatorOptions): void {
if (!(options.database || options.firestore || options.hub)) {
if (!(options.database || options.firestore || options.storage || options.hub)) {
throw new Error(
"Argument to useEmulators must contain at least one of 'database', 'firestore', or 'hub'."
"Argument to useEmulators must contain at least one of 'database', 'firestore', 'storage', or 'hub'."
);
}

Expand Down