describe("ERC5269",function(){asyncfunctiondeployFixture(){// ...}describe("Deployment",function(){// ...it("Should emit proper OnSupportERC events",asyncfunction(){// 应该发出正确的 OnSupportERC 事件let{txDeployErc721}=awaitloadFixture(deployFixture);letevents=txDeployErc721.events?.filter(event=>event.event==='OnSupportERC');expect(events).to.have.lengthOf(4);letev5269=events!.filter((event)=>event.args!.majorERCIdentifier.eq(5269));expect(ev5269).to.have.lengthOf(1);expect(ev5269[0].args!.caller).to.equal(BigNumber.from(0));expect(ev5269[0].args!.minorERCIdentifier).to.equal(BigNumber.from(0));expect(ev5269[0].args!.ercStatus).to.equal(ethers.utils.id("DRAFTv1"));letev721=events!.filter((event)=>event.args!.majorERCIdentifier.eq(721));expect(ev721).to.have.lengthOf(3);expect(ev721[0].args!.caller).to.equal(BigNumber.from(0));expect(ev721[0].args!.minorERCIdentifier).to.equal(BigNumber.from(0));expect(ev721[0].args!.ercStatus).to.equal(ethers.utils.id("FINAL"));expect(ev721[1].args!.caller).to.equal(BigNumber.from(0));expect(ev721[1].args!.minorERCIdentifier).to.equal(ethers.utils.id("ERC721Metadata"));expect(ev721[1].args!.ercStatus).to.equal(ethers.utils.id("FINAL"));// ...});it("Should return proper ercStatus value when called supportERC() for declared supported ERC/features",asyncfunction(){// 当为声明支持的 ERC/功能调用 supportERC() 时,应返回正确的 ercStatus 值let{erc721ForTesting,owner}=awaitloadFixture(deployFixture);expect(awaiterc721ForTesting.supportERC(owner.address,5269,ethers.utils.hexZeroPad("0x00",32),[])).to.equal(ethers.utils.id("DRAFTv1"));expect(awaiterc721ForTesting.supportERC(owner.address,721,ethers.utils.hexZeroPad("0x00",32),[])).to.equal(ethers.utils.id("FINAL"));expect(awaiterc721ForTesting.supportERC(owner.address,721,ethers.utils.id("ERC721Metadata"),[])).to.equal(ethers.utils.id("FINAL"));// ...expect(awaiterc721ForTesting.supportERC(owner.address,721,ethers.utils.id("WRONG FEATURE"),[])).to.equal(BigNumber.from(0));expect(awaiterc721ForTesting.supportERC(owner.address,9999,ethers.utils.hexZeroPad("0x00",32),[])).to.equal(BigNumber.from(0));});it("Should return zero as ercStatus value when called supportERC() for non declared ERC/features",asyncfunction(){// 当为未声明的 ERC/功能调用 supportERC() 时,应返回零作为 ercStatus 值let{erc721ForTesting,owner}=awaitloadFixture(deployFixture);expect(awaiterc721ForTesting.supportERC(owner.address,721,ethers.utils.id("WRONG FEATURE"),[])).to.equal(BigNumber.from(0));expect(awaiterc721ForTesting.supportERC(owner.address,9999,ethers.utils.hexZeroPad("0x00",32),[])).to.equal(BigNumber.from(0));});});});