UNPKG

baxterize

Version:

A dumb a library which will expand letters and numbers into spelled out versions and except it own output as an input to reverse the transform.

41 lines (27 loc) 1.04 kB
const test = require('tape'); const baxterize = require('./../index.js'); const setup = (options) => { return new baxterize(options); }; test('initialize - should store any options provided in a `params` keys', (assert) => { const options = { foo: 'bar', left: 'right', YABBA: 'DABBA' }; const instance = setup(options); assert.equal(instance.params, options, 'instance instantiated successfully'); assert.end(); }); test('initialize - should use the `alpha` map by default', (assert) => { }); test('initialize - should only allow the `type` key for `options` to be `phonetic`or `alpha`', (assert) => { }); test('initialize - should allow users to provide their own `map` if `type` is not provided', (assert) => { }); test('expand - should convert any integers provided into strings', (assert) => { }); test('expand - should insert a number of hyphens equal to the length of the source string', (assert) => { }); test('expand - should never return a hyphen as the last character in a string', (assert) => { });