[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POC for RUTv2 with JS v9 modular SDK. #209

Merged
merged 6 commits into from
Sep 16, 2021
Merged

Conversation

yuchenshi
Copy link
Member
@yuchenshi yuchenshi commented Aug 31, 2021

This adds some minimal tests (assertsFail and assertSucceed, authed and unauthed, RTDB and Firestore) to show the format of the new Rules Unit Testing library (RUT). This PR also functions as a summary of the changes necessary to start testing in an existing project.

Happy testing!

馃尮馃崚馃崜馃尪馃帓馃巿馃崕 馃И馃崁 馃挌 馃 馃嵉 馃尩馃崗

Copy link
Contributor
@rachelmyers rachelmyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! :shipit:

@rachelmyers
Copy link
Contributor

The failing tests in firestore.spec.js and database.spec.js are blocking the update to v9. I'll make sure that any tests there are recreated in the new tests, and then replace those files with these.

unit-test-security-rules-v9/test/database.spec.js Outdated Show resolved Hide resolved
unit-test-security-rules-v9/test.ts Outdated Show resolved Hide resolved
unit-test-security-rules-v9/test/firestore.spec.js Outdated Show resolved Hide resolved
@yuchenshi yuchenshi merged commit 8f7d63d into master Sep 16, 2021
@yuchenshi yuchenshi deleted the ys/rules-unit-testing-v9 branch September 16, 2021 00:52
@yuchenshi
Copy link
Member Author
yuchenshi commented Sep 16, 2021

Merged, but note that tests for v9 directory won't pass until firebase/firebase-js-sdk#5501 is fixed. I'll enable CI for the directory after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants