Skip to content

Commit

Permalink
[sdk/nodejs] Regression test for passing provider to an MLC
Browse files Browse the repository at this point in the history
This adds a regression test that ensures a provider passed to a MLC's `provider` resource option will not be included the `RegisterResourceRequest`'s `provider` (but will be included in `providers`).

Note: We do want to be able to support specifying a MLC's provider (to allow explicit providers for MLCs), but we'll address that in a separate change.
  • Loading branch information
justinvp committed Dec 1, 2022
1 parent beaf07d commit 0badb99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdk/nodejs
description: Fix regression when passing a provider to a MLC
1 change: 1 addition & 0 deletions sdk/nodejs/tests/runtime/langhost/run.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,7 @@ describe("rpc", () => {
propertyDeps?: any, ignoreChanges?: string[], version?: string, importID?: string,
replaceOnChanges?: string[], providers?: any) => {
if (name === "singular" || name === "map" || name === "array") {
assert.strictEqual(provider, "");
assert.deepStrictEqual(Object.keys(providers), ["test"]);
}
return { urn: makeUrn(t, name), id: undefined, props: undefined };
Expand Down

0 comments on commit 0badb99

Please sign in to comment.