infrastructure-upgrade/lib/openzeppelin-contracts/test/introspection/ERC165.test.js
T-Hax 735546619e
init
Signed-off-by: T-Hax <>
2023-04-08 18:46:18 +00:00

21 lines
589 B
JavaScript

const { contract } = require('@openzeppelin/test-environment');
const { expectRevert } = require('@openzeppelin/test-helpers');
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
const ERC165Mock = contract.fromArtifact('ERC165Mock');
describe('ERC165', function () {
beforeEach(async function () {
this.mock = await ERC165Mock.new();
});
it('does not allow 0xffffffff', async function () {
await expectRevert(this.mock.registerInterface('0xffffffff'), 'ERC165: invalid interface id');
});
shouldSupportInterfaces([
'ERC165',
]);
});