Skip to content

Commit

Permalink
Add TS test
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Oct 20, 2022
1 parent 231e301 commit 1c220f3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sdk/nodejs/tests/runtime/langhost/run.spec.ts
@@ -1,4 +1,4 @@
// Copyright 2016-2018, Pulumi Corporation.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -783,7 +783,15 @@ describe("rpc", () => {
"component_opt_providers_array": {
program: path.join(base, "042.component_opt_providers_array"),
expectResourceCount: 240,
registerResource: parentDefaultsRegisterResource,
registerResource: (
ctx: any, dryrun: boolean, t: string, name: string, res: any, dependencies?: string[],
custom?: boolean, protect?: boolean, parent?: string, provider?: string, providers?: string[]) => {
if (!custom && name.includes('/c3')) {
if (providers!.length == 0)
throw new Error("Expected some providers")
}
return parentDefaultsRegisterResource(ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider);
},
},
"depends_on_non_resource": {
program: path.join(base, "043.depends_on_non_resource"),
Expand Down

0 comments on commit 1c220f3

Please sign in to comment.