run vitest for LocalPlatform in pr_checks
This commit is contained in:
parent
b6f2aa64e6
commit
dd08321f4a
2 changed files with 4 additions and 2 deletions
1
.github/workflows/pr_checks.yaml
vendored
1
.github/workflows/pr_checks.yaml
vendored
|
|
@ -408,6 +408,7 @@ jobs:
|
|||
run: |
|
||||
cd core
|
||||
npm test
|
||||
npm run vitest
|
||||
env:
|
||||
IGNORE_API_KEY_TESTS: ${{ github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]' }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
|
|
|||
|
|
@ -166,6 +166,8 @@ describe("LocalPlatformClient", () => {
|
|||
testFQSN2,
|
||||
]);
|
||||
|
||||
// both the secrets should be present as they are retrieved from different files
|
||||
|
||||
expect(resolvedFQSNs.length).toBe(2);
|
||||
|
||||
const continueDirSecretValue = (
|
||||
|
|
@ -174,7 +176,6 @@ describe("LocalPlatformClient", () => {
|
|||
const dotEnvSecretValue = (
|
||||
resolvedFQSNs[1] as SecretResult & { value: unknown }
|
||||
)?.value;
|
||||
|
||||
expect(continueDirSecretValue).toContain(secretValue);
|
||||
expect(continueDirSecretValue).toContain(randomValueForContinueDirDotEnv);
|
||||
expect(dotEnvSecretValue).toContain(secretValue + "-workspace");
|
||||
|
|
@ -217,10 +218,10 @@ describe("LocalPlatformClient", () => {
|
|||
const resolvedFQSNs = await localPlatformClient.resolveFQSNs([testFQSN]);
|
||||
|
||||
expect(resolvedFQSNs.length).toBe(1);
|
||||
|
||||
expect(
|
||||
(resolvedFQSNs[0] as SecretResult & { value: unknown })?.value,
|
||||
).toContain(secretValue);
|
||||
// we check that workspace <workspace>.continue/.env does not override the <workspace>/.env secret
|
||||
expect(
|
||||
(resolvedFQSNs[0] as SecretResult & { value: unknown })?.value,
|
||||
).toContain(randomValueForContinueDirDotEnv);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue