chore: fix lint

This commit is contained in:
ryanycw
2025-01-21 00:07:28 +08:00
committed by TI-HE CHEN
parent d85fdee4c7
commit 995e4dfa98
2 changed files with 28 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ import {
createMultipleUserIdentity,
genEpochKeyLiteProof,
genReputationProof,
genUserState
genUserState,
} from './utils'
const { STATE_TREE_DEPTH } = CircuitConfig.default
@@ -119,7 +119,12 @@ describe('Comment Test', function () {
repProof.proof[0] = BigInt(0)
await expect(
app.leaveComment(repProof.publicSignals, repProof.proof, BigInt(0), content)
app.leaveComment(
repProof.publicSignals,
repProof.proof,
BigInt(0),
content
)
).to.be.reverted
userState.stop()
})
@@ -137,7 +142,12 @@ describe('Comment Test', function () {
inputProof = repProof.proof
await expect(
app.leaveComment(repProof.publicSignals, repProof.proof, postId, content)
app.leaveComment(
repProof.publicSignals,
repProof.proof,
postId,
content
)
)
.to.emit(app, 'Comment')
.withArgs(

View File

@@ -12,7 +12,7 @@ import { IdentityObject } from './types'
import {
createRandomUserIdentity,
genReputationProof,
genUserState
genUserState,
} from './utils'
const { FIELD_COUNT } = CircuitConfig.default
@@ -120,8 +120,9 @@ describe('Unirep App', function () {
repProof.proof[0] = BigInt(0)
const content = 'Invalid Proof'
await expect(app.post(repProof.publicSignals, repProof.proof, content)).to.be
.reverted // revert in epkHelper.verifyAndCheck()
await expect(
app.post(repProof.publicSignals, repProof.proof, content)
).to.be.reverted // revert in epkHelper.verifyAndCheck()
userState.stop()
})
@@ -131,7 +132,9 @@ describe('Unirep App', function () {
const userState = await genUserState(user.id, app)
const repProof = await userState.genProveReputationProof({})
await expect(app.post(repProof.publicSignals, repProof.proof, content))
await expect(
app.post(repProof.publicSignals, repProof.proof, content)
)
.to.emit(app, 'Post')
.withArgs(repProof.publicSignals[0], 0, 0, content)
@@ -146,7 +149,9 @@ describe('Unirep App', function () {
inputPublicSig = repProof.publicSignals
inputProof = repProof.proof
await expect(app.post(repProof.publicSignals, repProof.proof, content))
await expect(
app.post(repProof.publicSignals, repProof.proof, content)
)
.to.emit(app, 'Post')
.withArgs(repProof.publicSignals[0], 1, 0, content)
@@ -187,7 +192,11 @@ describe('Unirep App', function () {
})
await expect(
app.post(repProof.publicSignals, repProof.proof, 'Invalid Epoch')
app.post(
repProof.publicSignals,
repProof.proof,
'Invalid Epoch'
)
).to.be.revertedWithCustomError(app, 'InvalidEpoch')
userState.stop()