Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afirstenberg committed Sep 11, 2024
1 parent 29f0b1c commit fde3717
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions libs/langchain-google-gauth/src/tests/media.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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,
};
Expand All @@ -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,
};
Expand Down

0 comments on commit fde3717

Please sign in to comment.