|
4 | 4 | validateThrowsForInvalidArguments, |
5 | 5 | getResponseContent, |
6 | 6 | defaultTestConfig, |
7 | | - getDataFromUntrustedContent, |
8 | 7 | } from "../../../helpers.js"; |
9 | 8 | import { beforeEach, describe, expect, it, vi, afterEach } from "vitest"; |
10 | 9 | import { |
@@ -483,7 +482,7 @@ describeWithMongoDB( |
483 | 482 | expect(responseContent).toContain("The aggregation resulted in 1 documents. Returning 1 documents."); |
484 | 483 | const untrustedDocs = getDocsFromUntrustedContent<{ name: string }>(responseContent); |
485 | 484 | expect(untrustedDocs).toHaveLength(1); |
486 | | - expect(untrustedDocs[0]!!.name).toBe("mongodb"); |
| 485 | + expect(untrustedDocs[0]?.name).toBe("mongodb"); |
487 | 486 | } |
488 | 487 | ); |
489 | 488 |
|
@@ -544,7 +543,7 @@ describeWithMongoDB( |
544 | 543 | expect(responseContent).toContain("The aggregation resulted in 1 documents. Returning 1 documents."); |
545 | 544 | const untrustedDocs = getDocsFromUntrustedContent<{ name: string }>(responseContent); |
546 | 545 | expect(untrustedDocs).toHaveLength(1); |
547 | | - expect(untrustedDocs[0]!!.name).toBe("mongodb"); |
| 546 | + expect(untrustedDocs[0]?.name).toBe("mongodb"); |
548 | 547 | } |
549 | 548 | ); |
550 | 549 |
|
@@ -605,7 +604,7 @@ describeWithMongoDB( |
605 | 604 | expect(responseContent).toContain("The aggregation resulted in 1 documents. Returning 1 documents."); |
606 | 605 | const untrustedDocs = getDocsFromUntrustedContent<{ name: string }>(responseContent); |
607 | 606 | expect(untrustedDocs).toHaveLength(1); |
608 | | - expect(untrustedDocs[0]!!.name).toBe("mongodb"); |
| 607 | + expect(untrustedDocs[0]?.name).toBe("mongodb"); |
609 | 608 | } |
610 | 609 | ); |
611 | 610 |
|
@@ -666,7 +665,7 @@ describeWithMongoDB( |
666 | 665 | expect(responseContent).toContain("The aggregation resulted in 1 documents. Returning 1 documents."); |
667 | 666 | const untrustedDocs = getDocsFromUntrustedContent<{ name: string }>(responseContent); |
668 | 667 | expect(untrustedDocs).toHaveLength(1); |
669 | | - expect(untrustedDocs[0]!!.name).toBe("mongodb"); |
| 668 | + expect(untrustedDocs[0]?.name).toBe("mongodb"); |
670 | 669 | } |
671 | 670 | ); |
672 | 671 | }, |
|
0 commit comments