So you can just follow the tutorials without writing, is a bit hard to follow without to much time.
First part Unit testing security rules with the Firebase Emulator Suite.
Second part Intermediate topics in Firebase Security Rules.
Clone the repo, then don't be lazy and check the tutorials from Youtube :v
firebase emulators:start --only firestore
in the test directory run: npm test
request.resource.data: The data who is been sending to db
resource.data: Data who is already in the db