CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
util.test.js24 linesDownload Raw Back to test
1'use strict'2 3const test = require('tape')4const {5  stringArrayToHexStripped6} = require('../lib/utils')7 8test('stringArrayToHexStripped', (t) => {9  const testCases = [10    [[['0', '0', '0', '0']], ''],11    [[['0', '0', '0', '0'], false], ''],12    [[['0', '0', '0', '0'], true], '0'],13    [[['0', '1', '0', '0'], false], '100'],14    [[['1', '0', '0', '0'], false], '1000'],15    [[['1', '0', '0', '0'], true], '1000']16  ]17 18  t.plan(testCases.length)19 20  testCases.forEach(([input, expected]) => {21    t.same(stringArrayToHexStripped(input[0], input[1]), expected)22  })23})24