source: imaps-frontend/node_modules/fast-uri/test/util.test.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 572 bytes
Line 
1'use strict'
2
3const test = require('tape')
4const {
5 stringArrayToHexStripped
6} = 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})
Note: See TracBrowser for help on using the repository browser.