Effect CommunityEC
Effect Community2y ago
33 replies
jrmdayn

Issue with FiberFailure Error in Vitest Testing with Effect Library

In my project, the following code
import { Effect } from 'effect';
import { expect, it } from 'vitest';

it('should work', () =>
  Effect.gen(function* () {
    expect(1).toBe(2);
  }).pipe(Effect.runPromise));

gives me a FiberFailure error reporting in the console (see screenshot) which is less useful than the proper vitest error reporting.

Same thing when I use
@effect/vitest
:
import { it, expect } from '@effect/vitest';
import { Effect } from 'effect';

it.effect('should work', () =>
  Effect.gen(function* () {
    expect(1).toBe(2);
  }),
);
Screenshot_2024-05-14_at_22.36.13.png
Was this page helpful?