remove nanoid, use crypto.randomUUID()

removes a dependency, and resolves an ESM require error
This commit is contained in:
itsMapleLeaf
2022-07-23 13:34:33 -05:00
committed by Darius
parent 35d7f0b33f
commit df9bdfaf77
5 changed files with 8 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
/* eslint-disable class-methods-use-this */
/* eslint-disable require-await */
import { nanoid } from "nanoid"
import { randomUUID } from "node:crypto"
import { setTimeout } from "node:timers/promises"
import type { ReactNode } from "react"
import { expect } from "vitest"
@@ -194,7 +194,7 @@ class TestCommandInteraction implements CommandInteraction {
}
class TestInteraction {
readonly id = nanoid()
readonly id = randomUUID()
readonly channelId = "test-channel-id"
constructor(