Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prb/test

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prb/test - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

18

CHANGELOG.md

@@ -7,2 +7,16 @@ # Changelog

## [0.1.3] - 2022-10-29
### Added
- Add more information in README (@paulrberg)
### Changed
- Fix typos in README (@jordaniza, @paulrberg)
- Improve usage guides in README (@paulrberg)
- Make `IS_TEST` virtual (@paulrberg)
- Remove superfluous `bytes20` cast (@paulrberg)
- Update fuzzing configuration in `foundry.toml` (@paulrberg)
## [0.1.2] - 2022-07-17

@@ -12,3 +26,4 @@

- Switch to global import to fix the overload type checker bug in Solidity v0.8.12 ([#5](https://github.com/paulrberg/prb-test/issues/5)) (@jordaniza, @paulrberg)
- Switch to global import to fix the overload type checker bug in Solidity v0.8.12
([#5](https://github.com/paulrberg/prb-test/issues/5)) (@jordaniza, @paulrberg)

@@ -27,4 +42,5 @@ ## [0.1.1] - 2022-07-15

[0.1.3]: https://github.com/paulrberg/prb-test/releases/tag/v0.1.3
[0.1.2]: https://github.com/paulrberg/prb-test/releases/tag/v0.1.2
[0.1.1]: https://github.com/paulrberg/prb-test/releases/tag/v0.1.1
[0.1.0]: https://github.com/paulrberg/prb-test/releases/tag/v0.1.0

25

LICENSE.md

@@ -5,18 +5,13 @@ MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{
"name": "@prb/test",
"description": "Modern collection of testing assertions and logging utilities for Solidity",
"version": "0.1.2",
"version": "0.1.3",
"author": {

@@ -13,5 +13,5 @@ "name": "Paul Razvan Berg",

"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"commitizen": "^4.2.4",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"commitizen": "^4.2.5",
"cz-conventional-changelog": "^3.3.0",

@@ -57,4 +57,4 @@ "husky": "^8.0.1",

"prettier:check": "prettier --config \"./.prettierrc.yml\" --check \"**/*.{json,md,sol,yml}\"",
"solhint": "solhint --config ./.solhint.json \"{src,test}/**/*.sol\""
"solhint": "solhint --config \"./.solhint.json\" \"{src,test}/**/*.sol\""
}
}

@@ -12,3 +12,4 @@ # PRBTest [![Github Actions][gha-badge]][gha] [![Foundry][foundry-badge]][foundry] [![Styled with Prettier][prettier-badge]][prettier] [![License: MIT][license-badge]][license]

PRBTest is a modern collection of testing assertions and logging utilities for Solidity, and is meant to be a drop-in replacement for DSTest.
PRBTest is a modern collection of testing assertions and logging utilities for Solidity, and is meant to be a drop-in
replacement for DSTest.

@@ -30,3 +31,3 @@ - Feature-packed: assertions for equalities, inequalities, approximate equalities, numerical comparisons, and more

```sh
forge install --no-commit paulrberg/prb-test@0.1.2
forge install --no-commit paulrberg/prb-test@0.1.3
```

@@ -38,3 +39,3 @@

[submodule "lib/prb-test"]
branch = "0.1.2"
branch = "0.1.3"
path = "lib/prb-test"

@@ -58,2 +59,7 @@ url = "https://github.com/paulrberg/prb-test"

### Template
If you're starting a project from scratch, the easiest way to install PRBTest is to use my [Foundry
template][my-foundry-template], since it comes pre-configured with PRBTest.
## Usage

@@ -69,3 +75,3 @@

import { PRBTest } from "@prb/test/PRBTest";
import { PRBTest } from "@prb/test/PRBTest.sol";

@@ -101,3 +107,4 @@ contract MyTest is PRBTest {

PRBTest can be used alongside all testing utilities from [forge-std][forge-std], except for their [Test][forge-std-test] contract.
PRBTest can be used alongside all testing utilities from [forge-std][forge-std], except for their [Test][forge-std-test]
contract.

@@ -124,3 +131,4 @@ ```solidity

[DSTest][ds-test] is great. I have myself used it for a while, and I like it a lot. But, with time, I slowly came to realize that there's a lot of room for improvement.
[DSTest][ds-test] is great. I have myself used it for a while, and I like it a lot. But, with time, I slowly came to
realize that there's a lot of room for improvement.

@@ -138,12 +146,17 @@ ### 1. Missing Features and Tests

DSTest doesn't version its releases, which makes it difficult to future-proof consumer repos. It's quite easy to
to accidentally update your git submodules and thus break your test suites. For [some users](https://github.com/dapphub/ds-test/issues/32), this is a real pain.
DSTest doesn't version its releases, which makes it difficult to future-proof consumer repos. It's quite easy to to
accidentally update your git submodules and thus break your test suites. For
[some users](https://github.com/dapphub/ds-test/issues/32), this is a real pain.
PRBTest is versioned via tags and branches and all changes are tracked in a [CHANGELOG](./CHANGELOG.md) file. I maintain redundant branches for each release because git submodules [don't support tags](https://stackoverflow.com/q/1777854/3873510).
PRBTest is versioned via tags and branches and all changes are tracked in a [CHANGELOG](./CHANGELOG.md) file. I maintain
redundant branches for each release because git submodules
[don't support tags](https://stackoverflow.com/q/1777854/3873510).
I will strive to follow the [semver](https://semver.org/) versioning scheme, though I won't do this before the v1.0 release, and it might not always be feasible.
I will strive to follow the [semver](https://semver.org/) versioning scheme, though I won't do this before the v1.0
release, and it might not always be feasible.
### 3. Path Dependence
As one of the maintainers of DSTest said [here](https://github.com/dapphub/ds-test/pull/21#issuecomment-903668033), updating DSTest is painful to orchestrate. The reasons for this are twofold:
As one of the maintainers of DSTest said [here](https://github.com/dapphub/ds-test/pull/21#issuecomment-903668033),
updating DSTest is painful to orchestrate. The reasons for this are twofold:

@@ -155,14 +168,16 @@ 1. Every DappTools project uses it as a git submodule.

This issue has led to a "balkanization" of DSTest forks and extensions. See, for instance, Solmate's [DSTestPlus][ds-test-plus] and Forge Std's
[Test][forge-std-test]. Also see the discussions in this [PR](https://github.com/foundry-rs/forge-std/pull/38), in which the PR
author ended up making the PR against `forge-std` rather than `ds-test` because he feared that his PR won't be merged in
the latter.
This issue has led to a "balkanization" of DSTest forks and extensions. See, for instance, Solmate's
[DSTestPlus][ds-test-plus] and Forge Std's [Test][forge-std-test]. Also see the discussions in this
[PR](https://github.com/foundry-rs/forge-std/pull/38), in which the PR author ended up making the PR against `forge-std`
rather than `ds-test` because he feared that his PR won't be merged in the latter.
### 4. Lack of Backward Compatibility with Node.js
It i my firm conviction that Foundry is the future of Ethereum smart contract development. Solidity code is best tested in Solidity itself.
It is my firm conviction that Foundry is the future of Ethereum smart contract development. Solidity code is best tested
in Solidity itself.
But, due to various historical reasons, the Ethereum ecosystem has for a long time relied upon JavaScript for testing smart contracts.
Refactoring a code base from Hardhat or Truffle to Foundry takes time, and it may not always be possible to do it in one
fell swoop. Thus, to ensure backwards compatibility, PRBTest is available as a [Node.js package](#node-js) in the npm package registry.
But, due to various historical reasons, the Ethereum ecosystem has for a long time relied upon JavaScript for testing
smart contracts. Refactoring a code base from Hardhat or Truffle to Foundry takes time, and it may not always be
possible to do it in one fell swoop. Thus, to ensure backwards compatibility, PRBTest is available as a
[Node.js package](#node-js) in the npm package registry.

@@ -173,3 +188,4 @@ For more details about this, see this discussion [here](https://github.com/dapphub/ds-test/issues/35).

Feel free to dive in! [Open](https://github.com/paulrberb/prb-test/issues/new) an issue, [start](https://github.com/paulrberb/prb-test/discussions/new) a discussion or submit a PR.
Feel free to dive in! [Open](https://github.com/paulrberb/prb-test/issues/new) an issue,
[start](https://github.com/paulrberb/prb-test/discussions/new) a discussion or submit a PR.

@@ -217,4 +233,6 @@ ### Pre Requisites

[ds-test]: https://github.com/dapphub/ds-test
[ds-test-plus]: https://github.com/Rari-Capital/solmate/blob/03e425421b24c4f75e4a3209b019b367847b7708/src/test/utils/DSTestPlus.sol
[ds-test-plus]:
https://github.com/Rari-Capital/solmate/blob/03e425421b24c4f75e4a3209b019b367847b7708/src/test/utils/DSTestPlus.sol
[forge-std]: https://github.com/foundry-rs/forge-std
[forge-std-test]: https://github.com/foundry-rs/forge-std/blob/c19dfd2f2a88a461216b0dd1f4961e1a85dcad46/src/Test.sol
[my-foundry-template]: https://github.com/paulrberg/foundry-template

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc