Skip to content

Conversation

@GregOnNet
Copy link
Contributor

solves #28

@GregOnNet GregOnNet changed the title Infra/vitest package updates infra: vitest package updates Mar 14, 2025
@seangwright
Copy link
Owner

I noticed some warnings in the CI run for the unit tests.

example:

 ✓ test/result/result.spec.ts (29 tests) 11ms
stderr | test/maybeAsync/maybeAsync.spec.ts > MaybeAsync > hasValue > returns a resolved Promise of true when there is a value
Promise returned by `expect(actual).resolves.toBe(expected)` was not awaited. Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. Please remember to await the assertion.
 ✓ test/maybe/maybe.spec.ts (22 tests) 13ms
    at /home/runner/work/typescript-functional-extensions/typescript-functional-extensions/test/maybeAsync/maybeAsync.spec.ts:87:26

Could we resolve these with the Vitest updates?

@GregOnNet
Copy link
Contributor Author

@seangwright Good catch.

I executed the tests locally and applied fixes in maybeAsync.spec.ts.

@GregOnNet
Copy link
Contributor Author

I also specified "type": "nodule" in package.json due to a warning coming from vite.

CleanShot 2025-03-15 at 07 25 04@2x

@seangwright
Copy link
Owner

@GregOnNet I had left the "type" property out of the package.json because of complexities I was concerned about with #3, however the nodejs ecosystem has matured since then and it looks like NestJs supports ESM packages as well... so maybe we can also simplify the build in the next release.

@seangwright seangwright merged commit 0e23cc0 into seangwright:main Mar 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants