Skip to content

Commit

Permalink
Regenerate CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahkagan committed Dec 10, 2024
1 parent 6b9a168 commit c19552c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,29 @@ jobs:
- store_test_results:
path: libs/test-utils/reports/

# @votingworks/test-utils-vitest
test-libs-test-utils-vitest:
executor: nodejs
resource_class: xlarge
steps:
- checkout-and-install
- run:
name: Build
command: |
pnpm --dir libs/test-utils-vitest build
- run:
name: Lint
command: |
pnpm --dir libs/test-utils-vitest lint
- run:
name: Test
command: |
pnpm --dir libs/test-utils-vitest test
environment:
JEST_JUNIT_OUTPUT_DIR: ./reports/
- store_test_results:
path: libs/test-utils-vitest/reports/

# @votingworks/types
test-libs-types:
executor: nodejs
Expand Down Expand Up @@ -1471,6 +1494,7 @@ workflows:
- test-libs-printing
- test-libs-res-to-ts
- test-libs-test-utils
- test-libs-test-utils-vitest
- test-libs-types
- test-libs-types-rs
- test-libs-ui
Expand Down
4 changes: 0 additions & 4 deletions libs/test-utils-vitest/src/console.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ test.each(['log', 'warn', 'error'] as const)(

test('suppressingConsoleOutput returns the value returned by the callback', () => {
expect(suppressingConsoleOutput(() => 'test')).toEqual('test');
expect('mock' in console.log).toEqual(false);
});

test('suppressingConsoleOutput resolves to the value returned by the callback', async () => {
await expect(
suppressingConsoleOutput(async () => await Promise.resolve('test'))
).resolves.toEqual('test');
expect('mock' in console.log).toEqual(false);
});

test('suppressingConsoleOutput throws the error thrown by the callback', () => {
Expand All @@ -32,12 +30,10 @@ test('suppressingConsoleOutput throws the error thrown by the callback', () => {
throw new Error('test');
})
).toThrowError('test');
expect('mock' in console.log).toEqual(false);
});

test('suppressingConsoleOutput rejects with the error thrown by the callback', async () => {
await expect(
suppressingConsoleOutput(() => Promise.reject(new Error('test')))
).rejects.toThrowError('test');
expect('mock' in console.log).toEqual(false);
});

0 comments on commit c19552c

Please sign in to comment.