Files
discordeno/packages/rest/tests/e2e/utils.ts
dependabot[bot] 6e70c59f41 build(deps-dev): bump chai from 4.3.10 to 5.0.0 (#3342)
* build(deps-dev): bump chai from 4.3.10 to 5.0.0

Bumps [chai](https://github.com/chaijs/chai) from 4.3.10 to 5.0.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](https://github.com/chaijs/chai/compare/v4.3.10...v5.0.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: chai to v5

* fix: missing chaiuse

* fix: missing chai import fix

* test: fix add delete guild

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: H01001000 <heiheiho000@gmail.com>
2024-01-11 20:35:50 +00:00

27 lines
774 B
TypeScript

import { type DiscordPartialGuild } from '@discordeno/types'
import { createRestManager } from '../../src/manager.js'
import { E2E_TEST_GUILD_ID, token } from './constants.js'
// For debugging purposes
// logger.setLevel(LogLevels.Debug)
// logger.setDepth(LogDepth.Full)
export const rest = createRestManager({
token,
})
rest.deleteQueueDelay = 10000
const guilds = await rest.get<DiscordPartialGuild[]>(rest.routes.guilds.userGuilds())
guilds.forEach((guild) => {
if (guild.owner) rest.deleteGuild(guild.id)
})
const guild = await rest.createGuild({ name: 'ddenotester' })
const channel = await rest.createChannel(guild.id, { name: 'ddenotestchannel' })
export const e2ecache = {
guild,
channel,
deletedGuild: false,
communityGuildId: E2E_TEST_GUILD_ID,
}