From fde371739fe0c975fd41e3946c76e28e22988a1a Mon Sep 17 00:00:00 2001
From: afirstenberg <github@addventure.com>
Date: Tue, 10 Sep 2024 22:31:50 -0400
Subject: [PATCH] Fix tests

---
 .../src/tests/media.int.test.ts               | 36 +++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/libs/langchain-google-gauth/src/tests/media.int.test.ts b/libs/langchain-google-gauth/src/tests/media.int.test.ts
index 15aa318f9ef2..88ea362dd004 100644
--- a/libs/langchain-google-gauth/src/tests/media.int.test.ts
+++ b/libs/langchain-google-gauth/src/tests/media.int.test.ts
@@ -12,10 +12,12 @@ describe("GAuth GCS store", () => {
     const uriPrefix = new GoogleCloudStorageUri("gs://test-langchainjs/");
     const uri = `gs://test-langchainjs/text/test-${Date.now()}-nm`;
     const content = "This is a test";
-    const blob = new MediaBlob({
-      path: uri,
-      data: new Blob([content], { type: "text/plain" }),
-    });
+    const blob = await MediaBlob.fromBlob(
+      new Blob([content], { type: "text/plain" }),
+      {
+        path: uri,
+      }
+    );
     const config: BlobStoreGoogleCloudStorageParams = {
       uriPrefix,
     };
@@ -34,14 +36,16 @@ describe("GAuth GCS store", () => {
     const uriPrefix = new GoogleCloudStorageUri("gs://test-langchainjs/");
     const uri = `gs://test-langchainjs/text/test-${Date.now()}-wm`;
     const content = "This is a test";
-    const blob = new MediaBlob({
-      path: uri,
-      data: new Blob([content], { type: "text/plain" }),
-      metadata: {
-        alpha: "one",
-        bravo: "two",
-      },
-    });
+    const blob = await MediaBlob.fromBlob(
+      new Blob([content], { type: "text/plain" }),
+      {
+        path: uri,
+        metadata: {
+          alpha: "one",
+          bravo: "two",
+        },
+      }
+    );
     const config: BlobStoreGoogleCloudStorageParams = {
       uriPrefix,
     };
@@ -65,10 +69,12 @@ describe("GAuth GCS store", () => {
 
     const uriPrefix = new GoogleCloudStorageUri("gs://test-langchainjs/");
     const uri = `gs://test-langchainjs/image/test-${Date.now()}-nm`;
-    const blob = new MediaBlob({
-      path: uri,
+    const blob = await MediaBlob.fromBlob(
       data,
-    });
+      {
+        path: uri,
+      }
+    )
     const config: BlobStoreGoogleCloudStorageParams = {
       uriPrefix,
     };