-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix viem TextEncoder dependency on Jest runtime
viem depdends on TextEncoder of the runtime and because the `jest.config.ts` didn't have the `testEnvironment` set, it was throwing an error. Setting the `testEnvironment` to `node` will fix the problem but limit the library runtime. Reference - paralleldrive/cuid2#44 - https://github.com/paralleldrive/cuid2?tab=readme-ov-file#using-in-jest Co-author: Pierre <pierre@narval.xyz>
- Loading branch information
1 parent
0cbe3bf
commit d39acdf
Showing
5 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
TRANSACTION_REQUEST_INTENT_PROJECT_NAME := transaction-request-intent | ||
|
||
transaction-request-intent/test/unit: | ||
npx nx test:unit ${TRANSACTION_REQUEST_INTENT_PROJECT_NAME} | ||
npx nx test:unit ${TRANSACTION_REQUEST_INTENT_PROJECT_NAME} -- ${ARGS} | ||
|
||
transaction-request-intent/test/unit/watch: | ||
make transaction-request-intent/test/unit ARGS=--watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
# transaction-request-intent | ||
# Transaction Request Intent | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
[![Transaction Request Intent CI](https://github.com/narval-xyz/narval/actions/workflows/transaction_request_intent_ci.yml/badge.svg?branch=main)](https://github.com/narval-xyz/narval/actions/workflows/transaction_request_intent_ci.yml) | ||
|
||
## Running unit tests | ||
Library to decode a | ||
[TransactionRequest](https://viem.sh/docs/glossary/types#transactionrequest) | ||
into an object with granular information. | ||
|
||
Run `nx test transaction-request-intent` to execute the unit tests via [Jest](https://jestjs.io). | ||
## Testing | ||
|
||
## Running lint | ||
|
||
Run `nx lint transaction-request-intent` to execute the lint via [ESLint](https://eslint.org/). | ||
```bash | ||
make transaction-request-intent/test/unit | ||
make transaction-request-intent/test/unit/watch | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters