Skip to content

Commit 513bae8

Browse files
committed
added non-null assertions
1 parent 6a7dca8 commit 513bae8

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

packages/b2c-cli/test/functional/e2e/ods-lifecycle.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('ODS Lifecycle E2E Tests', function () {
102102
const result = await runCLI(['ods', 'get', sandboxId, '--json']);
103103
if (result.exitCode === 0) {
104104
const sandbox = parseJson(result.stdout);
105-
return sandbox.state;
105+
return sandbox.state as null | string;
106106
}
107107
return null;
108108
}
@@ -136,8 +136,8 @@ describe('ODS Lifecycle E2E Tests', function () {
136136
);
137137

138138
// Store for subsequent tests
139-
sandboxId = response.id;
140-
serverHostname = response.hostName;
139+
sandboxId = response.id as string;
140+
serverHostname = response.hostName as string;
141141

142142
// Debug output to verify values are set
143143
console.log(`Created sandbox: ${sandboxId} on ${serverHostname}`);
@@ -161,9 +161,11 @@ describe('ODS Lifecycle E2E Tests', function () {
161161
expect(response.data, 'List response should contain data array').to.be.an('array');
162162

163163
// Find our sandbox in the list
164-
const foundSandbox = response.data.find((sandbox: Record<string, unknown>) => sandbox.id === sandboxId);
164+
const foundSandbox = (response.data as Record<string, unknown>[]).find(
165+
(sandbox: Record<string, unknown>) => sandbox.id === sandboxId,
166+
);
165167
expect(foundSandbox, `Sandbox '${sandboxId}' not found in list.`).to.exist;
166-
expect(foundSandbox.id).to.equal(sandboxId);
168+
expect(foundSandbox!.id).to.equal(sandboxId);
167169
});
168170
});
169171

0 commit comments

Comments
 (0)