bot18
Version:
A high-frequency cryptocurrency trading bot by Zenbot creator @carlos8f
21 lines (15 loc) • 513 B
JavaScript
/* eslint-env mocha */
const assert = require('assert')
const { isSnapshot } = require('../../../lib/util')
describe('isSnapshot - detects snapshots by data structure', () => {
it('returns false for heartbeats', () => {
assert.equal(isSnapshot(['hb']), false)
})
it('returns false simple lists (data updates)', () => {
assert.equal(isSnapshot([1337]), false)
})
it('returns true for nested lists (snapshots)', () => {
assert.equal(isSnapshot([['a'], ['b']]), true)
})
})