-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherc165_support.js
56 lines (50 loc) · 1.33 KB
/
erc165_support.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// LandERC721: ERC165 Interface ID tests
// Zeppelin test helpers
const {
BN,
constants,
expectEvent,
expectRevert,
} = require("@openzeppelin/test-helpers");
const {
assert,
expect,
} = require("chai");
const {
ZERO_ADDRESS,
ZERO_BYTES32,
MAX_UINT256,
} = constants;
// ERC165 tests runner helper by vittominacori
const {
shouldSupportInterfaces,
} = require("../include/SupportsInterface.behavior");
// deployment routines in use
const {
land_nft_deploy,
} = require("./include/deployment_routines");
// run ERC165 Interface ID tests
contract("LandERC721: ERC165 Interface ID tests", function(accounts) {
// extract accounts to be used:
// A0 – special default zero account accounts[0] used by Truffle, reserved
// a0 – deployment account having all the permissions, reserved
// H0 – initial token holder account
// a1, a2,... – working accounts to perform tests on
const [A0, a0, H0, a1, a2] = accounts;
let token;
beforeEach(async function() {
token = await land_nft_deploy(a0);
});
describe("run vittominacori's shouldSupportInterfaces", function() {
beforeEach(async function() {
// shouldSupportInterfaces uses this.token shortcut to access token instance
this.token = token;
});
shouldSupportInterfaces([
"ERC721",
"MintableERC721",
"LandERC721Metadata",
"ImmutableMintableERC721",
]);
});
});