Simplify type logic and remove dead code.
Implement latest Typescript features.
Cover more type tests and run time tests.
mandatory field type, a special type that mark keys as
updateoperations. Practical usage is to mark a key like
Query Constraint type change Read type. For example for query
where('a', '==', true), we can further narrow down the type of field
Running The Source Code
This library is tested against both emulators and live database, so please allow for unrestricted read and write access in your Firestore rules. Also, make sure to use a dummy Firebase project.
To get started, run
npm i. Then, create a
.env file in the project root directory and add the following line:
Do not upload PROJECT_ID because we do not restrict any access to Firestore for smooth testing purposes!
# must enclosed private key with single quotes
# copy everything of private key including the double quotes
PRIVATE_KEY='"-----BEGIN PRIVATE KEY-----\nSOME_SUPERLONG_STRING\n-----END PRIVATE KEY-----\n"'
Do not expose admin secrets.
Once you have your
.env file set up, place a copy of it into the
codeForDoc directory(for both web and admin). Then, you can run the following commands:
npm run d-testto test development code.
npm run b-q-testto test built code.
npm run p-q-testto test published code(You can specify which version to test by changing the