Pavel e6680f8e62
Improve ESLint monorepo configuration (#228)
* Unify ESLint configuration

* Add .eslintignore file

* Add Node and Jest ESLint plugins

* Fix linting issues

* Sort imports and type imports
2022-02-24 22:58:50 +01:00

44 lines
1.3 KiB
TypeScript

import { expect } from 'chai'
import { Waku } from 'js-waku'
import { Community } from './community'
import type { CommunityDescription } from './wire/community_description'
describe('Community [live data]', () => {
before(function () {
if (process.env.CI) {
// Skip live data test in CI
this.skip()
}
})
it('Retrieves community description For DappConnect Test from Waku prod fleet', async function () {
this.timeout(20000)
const waku = await Waku.create({ bootstrap: { default: true } })
await waku.waitForRemotePeer()
const community = await Community.instantiateCommunity(
'0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26',
waku
)
const desc = community.description as CommunityDescription
expect(desc).to.not.be.undefined
expect(desc.identity?.displayName).to.eq('Test Community')
const descChats = Array.from(desc.chats.values()).map(
chat => chat?.identity?.displayName
)
expect(descChats).to.include('Test Chat')
expect(descChats).to.include('Additional Chat')
const chats = Array.from(community.chats.values()).map(
chat => chat?.communityChat?.identity?.displayName
)
expect(chats).to.include('Test Chat')
expect(chats).to.include('Additional Chat')
})
})