UNPKG

@t7/utils

Version:

Utility methods for T7 components.

21 lines (18 loc) 672 B
"use strict"; var _ = require("./"); // Dependencies. // Describe test. describe('formatAlphanumeric', function () { // =========================== // Test for "existing" values. // =========================== it('handles "existing" values', function () { expect((0, _.formatAlphanumeric)('A~`!@#$%^&*()_+{}[];",.<>?/09')).toBe('A09'); }); // ======================================= // Test for `null` and `undefined` values. // ======================================= it('handles `null` and `undefined` values', function () { expect((0, _.formatAlphanumeric)(null)).toBe(''); expect((0, _.formatAlphanumeric)(undefined)).toBe(''); }); });