You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfirebase=require('@firebase/rules-unit-testing');constfs=require('fs');it('does not let a user read the status of another user',async()=>{construles=fs.readFileSync("../database.rules.json","utf8");awaitfirebase.loadDatabaseRules({databaseName: 'fsp2-a670d',
rules,})constadminApp=firebase.initializeAdminApp({databaseName: 'fsp2-a670d'})constrealtimeDb=adminApp.database();awaitrealtimeDb.ref('users/foo').set({online: true})consttestApp=firebase.initializeTestApp({databaseName: 'fsp2-a670d',auth: {uid: 'bar'}})consttestAppDb=testApp.database();awaitfirebase.assertFails(testAppDb.ref('users/foo').get())})
Uh oh!
There was an error while loading. Please reload this page.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
When using assert fails I get the error message,
Expected PERMISSION_DENIED but got unexpected error: Error: Permission denied
Steps to reproduce:
Relevant Code:
database.rules.json
test file
I opened a pull request to fix this issue here
The text was updated successfully, but these errors were encountered: