Skip to content

Commit 97d8ce3

Browse files
author
Ingrid Fielker
committed
more testing fixes
1 parent e84745c commit 97d8ce3

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

scripts/bin-test/run.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ set -ex # Immediately exit on failure
55
npm run build
66
npm link
77

8-
# Link local SDK to all test sources.
8+
# Link the extensions SDKs for the testing environment.
9+
(cd scripts/bin-test/extsdks/local && npm link)
10+
(cd scripts/bin-test/extsdks/translate && npm link)
11+
(cd scripts/bin-test/extsdks/translate && npm link firebase-functions)
12+
13+
# Link SDKs to all test sources.
914
for f in scripts/bin-test/sources/*; do
1015
if [ -d "$f" ]; then
1116
(cd "$f" && npm link firebase-functions)
17+
(cd "$f" && npm link @firebase-extensions/firebase-firestore-translate-text-sdk)
18+
(cd "$f" && npm link @firebase-extensions/local-backfill-sdk)
1219
fi
1320
done
1421

scripts/bin-test/test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const BASE_EXTENSIONS = {
4444
DO_BACKFILL: "False",
4545
LOCATION: "us-central1",
4646
},
47-
localPath: "./functions/generated/extensions/local/backfill0.0.2/src",
47+
localPath: "./functions/generated/extensions/local/backfill/0.0.2/src",
4848
events: [],
4949
},
5050
};
@@ -306,10 +306,12 @@ describe("functions.yaml", function () {
306306
},
307307
},
308308
},
309-
requiredAPIs: [{
310-
api: "eventarcpublishing.googleapis.com",
311-
reason: "Needed for custom event functions",
312-
},],
309+
requiredAPIs: [
310+
{
311+
api: "eventarcpublishing.googleapis.com",
312+
reason: "Needed for custom event functions",
313+
},
314+
],
313315
specVersion: "v1alpha1",
314316
extensions: BASE_EXTENSIONS,
315317
},

spec/fixtures/extsdk/translate/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,4 @@ export declare class FirestoreTranslateText {
119119
* Occurs when the function is settled. Provides no customized data other than the context.
120120
*/
121121
onCompletion<T = unknown>(callback: EventCallback<T>, options?: SimpleEventarcTriggerOptions): import("firebase-functions/v2").CloudFunction<CloudEvent<T>>;
122-
}
123-
//# sourceMappingURL=index.d.ts.map
122+
}

0 commit comments

Comments
 (0)