@t7/utils
Version:
Utility methods for T7 components.
22 lines (19 loc) • 520 B
JavaScript
var _ = require("./");
// Dependencies.
// Describe test.
describe('regex', function () {
// ======================
// Test for string value.
// ======================
it('handles string value', function () {
var r = (0, _.regex)('ABC?');
expect(r).toEqual(/ABC\?/g);
}); // =====================
// Test for array value.
// =====================
it('handles array value', function () {
var r = (0, _.regex)(['ABC?', 'XYZ?']);
expect(r).toEqual(/ABC\?|XYZ\?/g);
});
});
;