Skip to content

Commit

Permalink
Merge branch 'vite-migration' of https://github.com/caravan-bitcoin/c…
Browse files Browse the repository at this point in the history
…aravan into vitest-wallet
  • Loading branch information
DhairyaMajmudar committed Nov 10, 2024
2 parents 213751b + 130e309 commit 63b6c14
Show file tree
Hide file tree
Showing 37 changed files with 464 additions and 672 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,22 @@ import { BlockchainClient, ClientType } from "@caravan/clients";
```
- Note that now not only if you make a change to `caravan/coordinator` the changes will be reflected almost instantly in the app, but you can also make a change to the dependencies and everything will rebuild (technically turborepo only rebuilds what is necessary, caching the rest). Add a console.log to the `getFeeEstimate` in the `BlockchainClient` app and see for yourself!

## Testing

Caravan monorepo uses [vitest](https://vitest.dev) testing framework to test different pacakges within it.

- For running the test suite runners hit below command in terminal

```bash
turbo run test
```

**Editing test suite files:** Test suite files can be found in `__tests__` folder, every pacakge share a common vitest config file which manages test suiter runner environment.

In some files if environment is needed to be changed specifically, it can done by adding control comments at top of the file [docs reference](https://vitest.dev/guide/environment#environments-for-specific-files)



## Troubleshooting
- you might see an error "The request '...' failed to resolve only because it was resolved as fully specified"
Webpack has an [issue](https://github.com/webpack/webpack/issues/11467#issuecomment-691873586) by default
Expand Down
49 changes: 4 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

188 changes: 0 additions & 188 deletions packages/caravan-bitcoin/jest.config.js

This file was deleted.

5 changes: 3 additions & 2 deletions packages/caravan-bitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"lint-staged": "^13.1.2",
"mocha": "^10.2.0",
"prettier": "^3.2.5",
"react-silence": "^1.0.4",
"tsup": "^7.2.0",
"typescript": "^4.1.3"
},
Expand All @@ -66,8 +67,8 @@
"dev": "npm run build -- --watch",
"lint": "eslint src/ --ext .ts",
"ci": "npm run lint && npm run test",
"test": "jest src",
"test:watch": "jest --watch src"
"test": "vitest --watch=false src",
"test:watch": "vitest --watch src"
},
"bin": {},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { validateAddress } from "./addresses";
import * as multisig from "./multisig";
import { Network } from "./networks";
import { validateAddress } from "../addresses";
import * as multisig from "../multisig";
import { Network } from "../networks";

const P2PKH = "P2PKH";
const P2TR = "P2TR";
Expand Down
Loading

0 comments on commit 63b6c14

Please sign in to comment.