UNPKG

@t7/utils

Version:

Utility methods for T7 components.

42 lines (36 loc) 1.05 kB
"use strict"; var _ = require("./"); // Dependencies. // Describe test. describe('path', function () { // ====== // Reset. // ====== beforeEach(function () { window.location.hash = '#/DEFAULT?cache-buster=true'; }); // ===================== // Test for blank value. // ===================== it('handles blank value', function () { var URL = (0, _.path)(); expect(URL).toBe('#/DEFAULT'); }); // ====================== // Test for string value. // ====================== it('handles string value', function () { var URL = (0, _.path)('TEST'); expect(URL).toBe('#/TEST'); }); // ===================== // Test for array value. // ===================== it('handles array value', function () { var URL = (0, _.path)(['UNO', 'DOS']); expect(URL).toBe('#/UNO/DOS'); }); // ======================== // Test for arguments list. // ======================== it('handles arguments list', function () { var URL = (0, _.path)('UNO', 'DOS'); expect(URL).toBe('#/UNO/DOS'); }); });