mirror of
https://github.com/cupcakearmy/occulto.git
synced 2024-11-01 14:14:11 +01:00
16 lines
318 B
JavaScript
16 lines
318 B
JavaScript
export class Promises {
|
|
static async reject(fn) {
|
|
try {
|
|
await fn()
|
|
chai.expect.fail('Should have thrown error')
|
|
} catch {}
|
|
}
|
|
}
|
|
|
|
export function compareArrayLike(a, b) {
|
|
chai.expect(a.length).to.equal(b.length)
|
|
for (let i = 0; i < a.length; i++) {
|
|
chai.expect(a[i]).to.equal(b[i])
|
|
}
|
|
}
|