mirror of
https://github.com/cupcakearmy/occulto.git
synced 2024-12-22 03:46:27 +00: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])
|
|
}
|
|
}
|