Skip to content

Commit

Permalink
test: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
songkeys committed Jul 4, 2022
1 parent b8ac464 commit 4644560
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test/contracts/link.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Wallet } from 'ethers'
import { type BigNumberish, Wallet } from 'ethers'
import { expect, describe, test, beforeAll } from 'vitest'
import { Contract } from '../../src'
import { mockUser, genRandomHandle, metadataUri } from '../mock'
Expand All @@ -11,8 +11,8 @@ describe('link characters and check', () => {
})

// create two characters first
let characterId1: string | null = null
let characterId2: string | null = null
let characterId1: BigNumberish | null = null
let characterId2: BigNumberish | null = null
test('create two characters to link with', async () => {
characterId1 = await contract
.createCharacter(mockUser.address, genRandomHandle(), metadataUri)
Expand All @@ -26,7 +26,7 @@ describe('link characters and check', () => {
})

const linkType = 'follow'
let linklistId: string | null = null
let linklistId: BigNumberish | null = null
test('linkCharacter', async () => {
const result = await contract.linkCharacter(
characterId1!,
Expand Down
3 changes: 2 additions & 1 deletion test/contracts/note.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { type BigNumberish } from 'ethers'
import { expect, describe, test, beforeAll } from 'vitest'
import { Contract } from '../../src'
import { mockUser } from '../mock'

const contract = new Contract(mockUser.privateKey)

describe('should post note', () => {
let characterId: string
let characterId: BigNumberish
beforeAll(async () => {
await contract.connect()

Expand Down
4 changes: 2 additions & 2 deletions test/contracts/profile.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Wallet } from 'ethers'
import { type BigNumberish, Wallet } from 'ethers'
import { expect, describe, test, beforeAll } from 'vitest'
import { Contract } from '../../src'
import {
Expand All @@ -12,7 +12,7 @@ import {

const contract = new Contract(mockUser.privateKey)

let characterId: string | null = null
let characterId: BigNumberish | null = null

describe('should fail if not connected', () => {
test('should fail to createCharacter if not connected', () => {
Expand Down

0 comments on commit 4644560

Please sign in to comment.