I want to test these 3 different require in my mint function with Javascript.
function mint(uint256 _mintAmount) public payable {
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
I'm really new to testing so I tried something like this. obviously its wrong but how can I test that it requires more than 0 _mintAmount in a function like this
it('mint amount', async () =>{
_mintAmount > 0;
_mintAmount <= maxMintAmount;
supply + _mintAmount <= maxSupply;
})
also tried something like this:
also tried something like this:
it('mint amount', async () =>{
var _mintAmount = await NFT.mint(_mintAmount);
assert.equal(_mintAmount, _mintAmount > 0);
})