Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { initializeTestEnvironment } from '@firebase/rules-unit-testing';
- const clientConfig = {
- projectId: "platformsixx-next"
- };
- const test = async () => await initializeTestEnvironment({
- ...clientConfig,
- firestore: {
- rules: `
- rules_version = '2';
- service cloud.firestore {
- match /{document=**} {
- allow read, write: if true;
- }
- }
- `,
- },
- });
- export const db = test().then(async (app) => {
- console.log(app)
- return app.authenticatedContext("alice", { userId: "1", }).firestore();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement