@@ -80,7 +80,7 @@ export type TestResults = {
8080 getDeletedDocResult : string ,
8181 deleteAppResult : string ,
8282
83- // Tests that are only specific to the desrialization of Firestore
83+ // Tests that are only specific to the deserialization of Firestore
8484 // types within the CSR phase.
8585 csrDocumentSnapshotResult : string ,
8686 csrDocumentSnapshotOnResumeResult : string ,
@@ -146,7 +146,7 @@ export type SerializedFirestoreData = {
146146
147147/**
148148 * Util function that ensures the document in the Firestore service instance
149- * is of the same type as we expect in these tests.
149+ * is of the same shape as this version of the tests expect .
150150 */
151151async function setExpectedSerializedDataInFirestore ( firestore , path ) {
152152 const docRef = doc ( firestore , path ) ;
@@ -160,14 +160,14 @@ async function setExpectedSerializedDataInFirestore(firestore, path) {
160160}
161161
162162/**
163- * Returns a populated {@link SerializedFirestoreData} with Json serialized data.
163+ * Returns a populated {@link SerializedFirestoreData} with JSON serialized data.
164164 * This data can be validated by invoking {@link testSerializedFirestoreData}.
165165 *
166166 * The intended flow is for the CSR tests to render a page with both SSR and CSR logic.
167- * The SSR logic builds out this serialized data. The data is then passed to the CSR
167+ * The SSR logic builds out this serialized data which is then passed to the CSR
168168 * phase via Next JS component parameters. The CSR component then invokes {@link
169- * testSerializedFirestoreData} to deserialized the data and ensure it matches
170- * the expected values.
169+ * testSerializedFirestoreData} to deserialized the data and test it to ensure it
170+ * matches the expected values.
171171 */
172172export async function buildSerializedFirestoreData ( ) : Promise < SerializedFirestoreData > {
173173 const QUERY_PATH = '/nextJsTestStaticCollection_DoNotDelete' ;
@@ -207,6 +207,9 @@ export async function buildSerializedFirestoreData(): Promise<SerializedFirestor
207207}
208208
209209/**
210+ * Tests that the Firestore objects can be desieralized and that their values
211+ * match the original values that they were serialized from. See
212+ * {@link buildSerializedFirestoreData} for more information.
210213 *
211214 * @param testResults the state tests that may have already been executed.
212215 * @param serializedFirestoreData an instance of the data that was JSON serialized
@@ -312,7 +315,7 @@ export async function testSerializedFirestoreData(
312315
313316/**
314317 * Ensures the content of the document queried from Firestore matches the
315- * format that the tests expect.
318+ * format the tests expect.
316319 */
317320export function validateDocumentData ( documentData ) : boolean {
318321 if ( documentData !== undefined ) {
0 commit comments