Skip to content

Commit 90c8e8d

Browse files
committed
Fix tests
1 parent 799936c commit 90c8e8d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

components/server/src/user/env-var-service.spec.db.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,8 @@ describe("EnvVarService", async () => {
293293

294294
const envVars = await es.resolveEnvVariables(member.id, undefined, "regular", commitContext);
295295
envVars.workspace.forEach((e) => delete (e as any).id);
296-
expect(envVars).to.deep.equal({
297-
project: [],
298-
workspace: [fooAnyUserEnvVar, barUserCommitEnvVar],
299-
});
296+
expect(envVars.project.length).to.be.equal(0);
297+
expect(envVars.workspace).to.have.deep.members([fooAnyUserEnvVar, barUserCommitEnvVar]);
300298
});
301299

302300
it("should resolve env variables prebuild", async () => {
@@ -419,7 +417,7 @@ describe("EnvVarService", async () => {
419417
},
420418
];
421419

422-
await es.setEnvVar(member.id, project.id, userEnvVars[0], resourceAccessGuard);
420+
await es.setEnvVar(member.id, member.id, userEnvVars[0], resourceAccessGuard);
423421

424422
const envVars = await es.resolveEnvVariables(member.id, project.id, "prebuild", commitContext);
425423
expect(envVars).to.deep.equal({
@@ -453,10 +451,8 @@ describe("EnvVarService", async () => {
453451
...contextEnvVars,
454452
});
455453
envVars.workspace.forEach((e) => delete (e as any).id);
456-
expect(envVars).to.deep.equal({
457-
project: [],
458-
workspace: [fooAnyUserEnvVar, barContextEnvVar],
459-
});
454+
expect(envVars.project.length).to.be.equal(0);
455+
expect(envVars.workspace).to.have.deep.members([fooAnyUserEnvVar, barContextEnvVar]);
460456
});
461457

462458
it("should resolve env variables from context with project ", async () => {

0 commit comments

Comments
 (0)