Actually i am validating an function to check that only whitelisted members or owner can access this function but when i am running this test file i am getting reverting error that Error
Validations
should revert error for non whitelisted memeber:
Error: VM Exception while processing transaction: reverted with reason string 'Only owner or whiteListed members allowed'
at KeyboardNFT.isWhiteListedorOwner (contracts/nft_erc721.sol:1102)
Code
describe("Validations", function () {
it("should revert error for non whitelisted memeber", async function () {
const {hardhatToken, owner, addr1, addr2} = await loadFixture(deployTokenFixture);
expect(await hardhatToken.connect(addr1).awardItem(addr1.address,"first nft")).to.throw("Only owner or whiteListed members allowed");
});
});