Skip to content

Commit

Permalink
more testing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingrid Fielker committed Aug 14, 2024
1 parent e84745c commit 97d8ce3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
9 changes: 8 additions & 1 deletion scripts/bin-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ set -ex # Immediately exit on failure
npm run build
npm link

# Link local SDK to all test sources.
# Link the extensions SDKs for the testing environment.
(cd scripts/bin-test/extsdks/local && npm link)
(cd scripts/bin-test/extsdks/translate && npm link)
(cd scripts/bin-test/extsdks/translate && npm link firebase-functions)

# Link SDKs to all test sources.
for f in scripts/bin-test/sources/*; do
if [ -d "$f" ]; then
(cd "$f" && npm link firebase-functions)
(cd "$f" && npm link @firebase-extensions/firebase-firestore-translate-text-sdk)
(cd "$f" && npm link @firebase-extensions/local-backfill-sdk)
fi
done

Expand Down
12 changes: 7 additions & 5 deletions scripts/bin-test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const BASE_EXTENSIONS = {
DO_BACKFILL: "False",
LOCATION: "us-central1",
},
localPath: "./functions/generated/extensions/local/backfill0.0.2/src",
localPath: "./functions/generated/extensions/local/backfill/0.0.2/src",
events: [],
},
};
Expand Down Expand Up @@ -306,10 +306,12 @@ describe("functions.yaml", function () {
},
},
},
requiredAPIs: [{
api: "eventarcpublishing.googleapis.com",
reason: "Needed for custom event functions",
},],
requiredAPIs: [
{
api: "eventarcpublishing.googleapis.com",
reason: "Needed for custom event functions",
},
],
specVersion: "v1alpha1",
extensions: BASE_EXTENSIONS,
},
Expand Down
3 changes: 1 addition & 2 deletions spec/fixtures/extsdk/translate/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,4 @@ export declare class FirestoreTranslateText {
* Occurs when the function is settled. Provides no customized data other than the context.
*/
onCompletion<T = unknown>(callback: EventCallback<T>, options?: SimpleEventarcTriggerOptions): import("firebase-functions/v2").CloudFunction<CloudEvent<T>>;
}
//# sourceMappingURL=index.d.ts.map
}

0 comments on commit 97d8ce3

Please sign in to comment.