Skip to content

Commit

Permalink
Add recursiveDelete test to full-setup-library-firestore.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
netdown authored Jan 26, 2024
1 parent 13d6dc9 commit 4353045
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions __tests__/full-setup-library-firestore.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe.each([
mockListCollections,
mockTimestampNow,
mockCreate,
mockRecursiveDelete,
} = require('firestore-jest-mock/mocks/firestore');

describe('we can start a firestore application', () => {
Expand Down Expand Up @@ -381,6 +382,15 @@ describe.each([
expect(mockWhere).toHaveBeenCalled();
expect(mockOnSnapShot).toHaveBeenCalled();
});

test('recursiveDelete', async () => {
const db = firebase.firestore();
const citiesRef = db.collection('cities');

db.recursiveDelete(citiesRef)

expect(mockRecursiveDelete).toHaveBeenCalledWith(citiesRef);
});
});
});
});

0 comments on commit 4353045

Please sign in to comment.