Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Sep 25, 2023
1 parent 2bc1e86 commit 0bbe58e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

lint-build-test:
runs-on: ubuntu-latest
name: Lint, build and test
name: Build, lint and test
steps:
- name: Clone repo
uses: actions/checkout@v4
Expand All @@ -34,10 +34,10 @@ jobs:
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run prettier:check && pnpm run eslint:check
- name: Build
run: pnpm run build
- name: Lint
run: pnpm run prettier:check && pnpm run eslint:check
- name: Test
run: pnpm run test

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export const generateErrorResponse = (
};

export const getConfig = () =>
configSchema.parse(JSON.parse(readFileSync(join(__dirname, '../config/signed-api.json'), 'utf8')));
configSchema.parse(JSON.parse(readFileSync(join(__dirname, '../config/signed-api.example.json'), 'utf8')));
4 changes: 2 additions & 2 deletions packages/data-pusher/src/validation/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { readFileSync } from 'fs';
import { join } from 'path';
import { configSchema } from './schema';

it('validates example config', () => {
it('validates example config', async () => {
const config = JSON.parse(readFileSync(join(__dirname, '../../config/pusher.example.json'), 'utf8'));

expect(() => configSchema.parse(config)).not.toThrow();
await expect(configSchema.parseAsync(config)).resolves.not.toThrow();
});

0 comments on commit 0bbe58e

Please sign in to comment.