Files
discordeno/packages/utils/tests/bigint.spec.ts
Jonathan Ho eaf8782d34 test: fix rest and utils test (#2723)
* test(utils): fix  cant import collection

* test(rest): await expect

* fix(utils): deno compactability

* test(utils): typing

* fix(utils): add return type
2023-01-15 11:04:20 -06:00

25 lines
756 B
TypeScript

import { expect } from 'chai'
import { describe, it } from 'mocha'
// import { bigintToSnowflake, snowflakeToBigint } from '../src/bigint.js'
let bigintToSnowflake: any, snowflakeToBigint: any
describe.skip('bigint.ts', () => {
it('[bigint] - Transform a snowflake string to bigint', () => {
const text = '130136895395987456'
const big = 130136895395987456n
const result = snowflakeToBigint(text)
expect(big).to.be.equal(result)
expect(text).to.be.not.equal(result)
})
it('[bigint] - Transform a bigint to a string', () => {
const text = '130136895395987456'
const big = 130136895395987456n
const result = bigintToSnowflake(big)
expect(text).to.be.equal(result)
expect(big).to.be.not.equal(result)
})
})