general fixes

This commit is contained in:
Dennis Eichhorn 2024-04-19 02:08:38 +00:00
parent dcf2fde55a
commit d2e2bf97df
71 changed files with 2190 additions and 1363 deletions

View File

@ -259,16 +259,16 @@ export class UriFactory
}
return '';
} else if (match.indexOf('?') === 0) {
} else if (match.indexOf('?') === 0 && match.length === 1) {
return current.query();
} else if (match.indexOf('/') === 0) {
} else if (match.indexOf('/') === 0 && match.length === 1) {
return current.path;
} else if (match.indexOf(':user') === 0) {
return current.user;
} else if (match.indexOf(':pass') === 0) {
return current.pass;
} else if (match.indexOf('/') === 0) {
return 'ERROR PATH';
return 'ERROR%20PATH';
} else if (match === '%') {
return window.location.href;
} else {

2500
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,10 @@
},
"homepage": "https://github.com/karaka-management/jsOMS#readme",
"devDependencies": {
"eslint-plugin-import": "^2.25.4"
"eslint-plugin-import": "^2.25.4",
"jasmine": "^5.1.0",
"jasmine-node": "^3.0.0",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0"
}
}

View File

@ -1,4 +1,4 @@
import { AccountManager } from '../Account/AccountManager.js';
import { AccountManager } from '../../Account/AccountManager.js';
describe('AccountManagerTest', function ()
{

View File

@ -1,4 +1,4 @@
import { Account } from '../Account/Account.js';
import { Account } from '../../Account/Account.js';
describe('AccountTest', function ()
{

View File

@ -1,4 +1,4 @@
import { AccountType } from '../Account/AccountType.js';
import { AccountType } from '../../Account/AccountType.js';
describe('AccountTypeTest', function ()
{

View File

@ -1,4 +1,4 @@
import { AssetManager } from '../Asset/AssetManager.js';
import { AssetManager } from '../../Asset/AssetManager.js';
describe('AssetManagerTest', function ()
{

View File

@ -1,12 +0,0 @@
describe('AreaChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('BarChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('BoxplotChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('CalendarChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('CandlestickChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('ChartLegendTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('ColumnChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('DiffAreaChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('DonutChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('FillGougeChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('GanttChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('GougeChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('GroupedBarChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('GroupedColumnChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('LineChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('OhlcChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('PieChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('PositionEnumTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('PositionTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,12 +0,0 @@
describe('PyramidChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('RadarChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('ScatterplotChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('StackedAreaChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('StackedBarChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('StackedColumnChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('TextElementTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('TreeChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('VWaterfallChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,12 +0,0 @@
describe('WaterfallChartTest', function ()
{
'use strict';
beforeEach(function ()
{
});
afterEach(function ()
{
});
});

View File

@ -1,99 +0,0 @@
<html>
<head>
<style>
svg {
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
}
svg .axis {
font-size: 12px;
}
svg .title {
font-size: 25px;
}
svg .subtitle {
font-size: 12px;
}
svg .footer {
font-size: 12px;
}
svg .axis path,
svg .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
svg .line {
fill: none;
stroke: steelblue;
}
svg .tick > line {
opacity: 1;
}
svg rect.zoom-panel {
cursor: move;
fill: none;
pointer-events: all;
}
svg .dot {
stroke-width: 2px;
fill: #fff;
}
.dataPoint:hover {
cursor: pointer;
}
svg .dataPoint-dot {
stroke-width: 3px;
fill: #fff;
}
svg .dot:hover {
stroke-width: 3px;
fill: #000;
cursor: pointer;
}
.grid .tick {
stroke: lightgrey;
stroke-opacity: 0.7;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
div.tooltip {
color: #fff;
position: absolute;
top: 0;
left: 0;
text-align: left;
padding: 5px;
font: 12px sans-serif;
background: #363636;
border: 0;
border-radius: 3px;
pointer-events: none;
}
</style>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>
<div id="chart" style="width: 100%; height: 100%"></div>
<script src="../../../../jsOMS/Chart/ColumnChart.js"></script>

View File

@ -1,95 +0,0 @@
<html>
<head>
<style>
svg .axis {
font-size: 12px;
}
svg .title {
font-size: 25px;
}
svg .subtitle {
font-size: 12px;
}
svg .footer {
font-size: 12px;
}
svg .axis path,
svg .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
svg .line {
fill: none;
stroke: steelblue;
}
svg .tick > line {
opacity: 1;
}
svg rect.zoom-panel {
cursor: move;
fill: none;
pointer-events: all;
}
svg .dot {
stroke-width: 2px;
fill: #fff;
}
.dataPoint:hover {
cursor: pointer;
}
svg .dataPoint-dot {
stroke-width: 3px;
fill: #fff;
}
svg .dot:hover {
stroke-width: 3px;
fill: #000;
cursor: pointer;
}
.grid .tick {
stroke: lightgrey;
stroke-opacity: 0.7;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
div.tooltip {
color: #fff;
position: absolute;
top: 0;
left: 0;
text-align: left;
padding: 5px;
font: 12px sans;
background: #363636;
border: 0;
border-radius: 3px;
pointer-events: none;
}
</style>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>
<div id="chart" style="width: 100%; height: 100%"></div>
<script src="../../../../jsOMS/Chart/LineChart.js"></script>

View File

@ -1,99 +0,0 @@
<html>
<head>
<style>
svg {
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
}
svg .axis {
font-size: 12px;
}
svg .title {
font-size: 25px;
}
svg .subtitle {
font-size: 12px;
}
svg .footer {
font-size: 12px;
}
svg .axis path,
svg .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
svg .line {
fill: none;
stroke: steelblue;
}
svg .tick > line {
opacity: 1;
}
svg rect.zoom-panel {
cursor: move;
fill: none;
pointer-events: all;
}
svg .dot {
stroke-width: 2px;
fill: #fff;
}
.dataPoint:hover {
cursor: pointer;
}
svg .dataPoint-dot {
stroke-width: 3px;
fill: #fff;
}
svg .dot:hover {
stroke-width: 3px;
fill: #000;
cursor: pointer;
}
.grid .tick {
stroke: lightgrey;
stroke-opacity: 0.7;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
div.tooltip {
color: #fff;
position: absolute;
top: 0;
left: 0;
text-align: left;
padding: 5px;
font-size: 12px;
background: #363636;
border: 0;
border-radius: 3px;
pointer-events: none;
}
</style>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>
<div id="chart" style="width: 100%; height: 100%"></div>
<script src="../../../../jsOMS/Chart/PieChart.js"></script>

View File

@ -1,95 +0,0 @@
<html>
<head>
<style>
svg .axis {
font-size: 12px;
}
svg .title {
font-size: 25px;
}
svg .subtitle {
font-size: 12px;
}
svg .footer {
font-size: 12px;
}
svg .axis path,
svg .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
svg .line {
fill: none;
stroke: steelblue;
}
svg .tick > line {
opacity: 1;
}
svg rect.zoom-panel {
cursor: move;
fill: none;
pointer-events: all;
}
svg .dot {
stroke-width: 2px;
fill: #fff;
}
.dataPoint:hover {
cursor: pointer;
}
svg .dataPoint-dot {
stroke-width: 3px;
fill: #fff;
}
svg .dot:hover {
stroke-width: 3px;
fill: #000;
cursor: pointer;
}
.grid .tick {
stroke: lightgrey;
stroke-opacity: 0.7;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
div.tooltip {
color: #fff;
position: absolute;
top: 0;
left: 0;
text-align: left;
padding: 5px;
font: 12px sans;
background: #363636;
border: 0;
border-radius: 3px;
pointer-events: none;
}
</style>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>
<div id="chart" style="width: 100%; height: 100%"></div>
<script src="../../../../jsOMS/Chart/RadarChart.js"></script>

View File

@ -1,4 +1,4 @@
import { Options } from '../Config/Options.js';
import { Options } from '../../Config/Options.js';
describe('OptionsTest', function ()
{

View File

@ -1,4 +1,4 @@
import { LocalStorage } from '../DataStorage/LocalStorage.js';
import { LocalStorage } from '../../DataStorage/LocalStorage.js';
describe('LocalStorageTest', function ()
{

View File

@ -1,4 +1,4 @@
import { EventManager } from '../Event/EventManager.js';
import { EventManager } from '../../Event/EventManager.js';
describe('EventManagerTest', function ()
{

View File

@ -1,4 +1,4 @@
import { NotificationLevel } from '../Message/Notification/NotificationLevel.js';
import { NotificationLevel } from '../../../Message/Notification/NotificationLevel.js';
describe('NotificationLevelTest', function ()
{

View File

@ -1,4 +1,4 @@
import { NotificationManager } from '../Message/Notification/NotificationManager.js';
import { NotificationManager } from '../../../Message/Notification/NotificationManager.js';
describe('NotificationManagerTest', function ()
{

View File

@ -1,4 +1,4 @@
import { NotificationMessage } from '../Message/Notification/NotificationMessage.js';
import { NotificationMessage } from '../../../Message/Notification/NotificationMessage.js';
describe('NotificationMessageTest', function ()
{

View File

@ -1,4 +1,4 @@
import { NotificationType } from '../Message/Notification/NotificationType.js';
import { NotificationType } from '../../../Message/Notification/NotificationType.js';
describe('NotificationTypeTest', function ()
{

View File

@ -1,4 +1,4 @@
import { RequestMethod } from '../Message/Request/RequestMethod.js';
import { RequestMethod } from '../../../Message/Request/RequestMethod.js';
describe('RequestMethodTest', function ()
{

View File

@ -1,4 +1,4 @@
import { RequestType } from '../Message/Request/RequestType.js';
import { RequestType } from '../../../Message/Request/RequestType.js';
describe('RequestTypeTest', function ()
{

View File

@ -1,4 +1,4 @@
import { ResponseType } from '../Message/Response/ResponseType.js';
import { ResponseType } from '../../../Message/Response/ResponseType.js';
describe('ResponseTypeTest', function ()
{

View File

@ -4,85 +4,23 @@
<meta charset="utf-8">
<title>Framework Test Suit</title>
<link rel="shortcut icon" type="image/png" href="jasmine/lib/jasmine-3.1.0/jasmine_favicon.png">
<link rel="stylesheet" href="jasmine/lib/jasmine-3.1.0/jasmine.css">
<link rel="stylesheet" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<!-- jasmine -->
<script src="jasmine/lib/jasmine-3.1.0/jasmine.js"></script>
<script src="jasmine/lib/jasmine-3.1.0/jasmine-html.js"></script>
<script src="jasmine/lib/jasmine-3.1.0/boot.js"></script>
<script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<script src="../node_modules/jasmine-core/lib/jasmine-core/boot0.js"></script>
<script src="../node_modules/jasmine-core/lib/jasmine-core/boot1.js"></script>
<!-- include source files here... -->
<!-- include general files here... -->
<script src="../Utils/oLib.js" type="module"></script>
<!-- include source files here... -->
<script src="../Asset/AssetManager.js" type="module"></script>
<script src="../Autoloader.js" type="module"></script>
<!-- include test files here... -->
<script src="../Uri/HttpUri.js" type="module"></script>
<script src="Uri/HttpUriTest.js" type="module"></script>
<script src="../Message/Request/Request.js" type="module"></script>
<script src="../Message/Request/OSType.js" type="module"></script>
<script src="../Message/Request/BrowserType.js" type="module"></script>
<script src="../Message/Request/RequestMethod.js" type="module"></script>
<script src="../Message/Request/RequestType.js" type="module"></script>
<script src="../Log/Logger.js" type="module"></script>
<script src="../Log/LogLevel.js" type="module"></script>
<script src="../Account/Account.js" type="module"></script>
<script src="../Account/AccountManager.js" type="module"></script>
<script src="../Account/AccountType.js" type="module"></script>
<script src="../Config/Options.js" type="module"></script>
<script src="../DataStorage/LocalStorage.js" type="module"></script>
<script src="../Event/EventManager.js" type="module"></script>
<script src="../Math/MathProcessor.js" type="module"></script>
<script src="../Message/Notification/NotificationLevel.js" type="module"></script>
<script src="../Message/Notification/NotificationType.js" type="module"></script>
<script src="../Message/Notification/NotificationMessage.js" type="module"></script>
<script src="../Message/Notification/App/AppNotification.js" type="module"></script>
<script src="../Message/Notification/Browser/BrowserNotification.js" type="module"></script>
<script src="../Message/Notification/NotificationManager.js" type="module"></script>
<script src="../Uri/Http.js" type="module"></script>
<script src="../Uri/UriFactory.js" type="module"></script>
<script src="../Utils/ArrayUtils.js" type="module"></script>
<script src="../Utils/GeneralUtils.js" type="module"></script>
<script src="../Utils/StringUtils.js" type="module"></script>
<!-- include spec files here... -->
<script src="Log/LoggerTest.js" type="module"></script>
<script src="Log/LogLevelTest.js" type="module"></script>
<script src="Asset/AssetManagerTest.js" type="module"></script>
<script src="Account/AccountTest.js" type="module"></script>
<script src="Account/AccountManagerTest.js" type="module"></script>
<script src="Account/AccountTypeTest.js" type="module"></script>
<script src="Config/OptionsTest.js" type="module"></script>
<script src="DataStorage/LocalStorageTest.js" type="module"></script>
<script src="Event/EventManagerTest.js" type="module"></script>
<script src="Math/MathProcessorTest.js" type="module"></script>
<script src="Message/Notification/NotificationLevelTest.js" type="module"></script>
<script src="Message/Notification/NotificationTypeTest.js" type="module"></script>
<script src="Message/Notification/NotificationMessageTest.js" type="module"></script>
<script src="Message/Notification/NotificationManagerTest.js" type="module"></script>
<script src="Message/Request/BrowserTypeTest.js" type="module"></script>
<script src="Message/Request/OSTypeTest.js" type="module"></script>
<script src="Message/Request/RequestMethodTest.js" type="module"></script>
<script src="Message/Request/RequestTypeTest.js" type="module"></script>
<script src="Message/Response/ResponseTypeTest.js" type="module"></script>
<script src="Uri/HttpTest.js" type="module"></script>
<script src="Uri/UriFactoryTest.js" type="module"></script>
<script src="Utils/ArrayUtilsTest.js" type="module"></script>
<script src="Utils/GeneralUtilsTest.js" type="module"></script>
<script src="Utils/StringUtilsTest.js" type="module"></script>
</head>
<body>
</body>

View File

@ -1,4 +1,4 @@
import { BrowserType } from '../Message/Request/BrowserType.js';
import { BrowserType } from '../../System/BrowserType.js';
describe('BrowserTypeTest', function ()
{

View File

@ -1,4 +1,4 @@
import { OSType } from '../Message/Request/OSType.js';
import { OSType } from '../../System/OSType.js';
describe('OSTypeTest', function ()
{

View File

@ -9,4 +9,4 @@ describe('AutocompleteTest', function ()
afterEach(function ()
{
});
}
});

View File

@ -9,4 +9,4 @@ describe('TabTest', function ()
afterEach(function ()
{
});
}
});

View File

@ -9,4 +9,4 @@ describe('TableTest', function ()
afterEach(function ()
{
});
}
});

View File

@ -9,4 +9,4 @@ describe('TagInputTest', function ()
afterEach(function ()
{
});
}
});

View File

@ -9,4 +9,4 @@ describe('TagListTest', function ()
afterEach(function ()
{
});
}
});

View File

@ -9,4 +9,4 @@ describe('GeneralUITest', function ()
afterEach(function ()
{
});
}
});

View File

@ -9,4 +9,4 @@ describe('EvaluatorTest', function ()
afterEach(function ()
{
});
}
});

View File

@ -1,12 +0,0 @@
describe('ClickTypeTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,12 +0,0 @@
describe('EventTypeTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,6 +1,6 @@
import { HttpUri } from '../../Uri/HttpUri.js';
describe('HttpTest', function ()
describe('HttpUriTest', function ()
{
'use strict';

View File

@ -62,14 +62,14 @@ describe('UriFactoryTest', function ()
{
it('Testing global queries', function ()
{
let uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={!#hash}&none=#none&found={/not}?v={/valid2}',
let uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={#hash}&found={/not}?v={/valid2}',
vars = {
'@ID' : 1,
'.mTest': 'someString',
'/path' : 'PATH',
'#hash' : 'test',
},
expected = 'www.test-uri.com?id=1&test=someString&two=PATH&hash=test&none=#none&found=ERROR PATH&v=query4';
expected = 'www.test-uri.com?id=1&test=someString&two=PATH&hash=test&found=ERROR%20PATH&v=query4';
expect(UriFactory.setQuery('/valid2', 'query4')).toBeTruthy();
expect(UriFactory.build(uri, vars)).toBe(expected);

View File

@ -1,28 +0,0 @@
describe('ArrayUtilsTest', function ()
{
'use strict';
describe('testGetArray', function ()
{
it('Testing get functionality', function ()
{
const expected = {
'a' : {
'aa' : 1,
'ab' : [
'aba',
'ab0',
[
3,
'c',
],
4,
],
},
2 : '2a',
};
expect(jsOMS.getArray('a/ab/1', expected)).toBe('ab0');
});
});
});

View File

@ -1,19 +0,0 @@
describe('GeneralUtilsTest', function ()
{
'use strict';
describe('testIsset', function ()
{
it('Testing isset functionality', function ()
{
let value;
expect(jsOMS.isset(value)).toBeFalsy();
expect(jsOMS.isset(null)).toBeFalsy();
expect(jsOMS.isset('')).toBeTruthy();
let value3 = 1;
expect(jsOMS.isset(value3)).toBeTruthy();
});
});
});

View File

@ -1,56 +0,0 @@
describe('StringUtilsTest', function ()
{
'use strict';
describe('testTrim', function ()
{
it('Testing trim functionality', function ()
{
expect(jsOMS.trim(' hello ')).toBe('hello');
expect(jsOMS.trim(' hello')).toBe('hello');
expect(jsOMS.trim('hello ')).toBe('hello');
});
it('Testing rtrim functionality', function ()
{
expect(jsOMS.rtrim(' hello ')).toBe(' hello');
expect(jsOMS.rtrim(' hello')).toBe(' hello');
expect(jsOMS.rtrim('hello ')).toBe('hello');
});
it('Testing ltrim functionality', function ()
{
expect(jsOMS.ltrim(' hello ')).toBe('hello ');
expect(jsOMS.ltrim(' hello')).toBe('hello');
expect(jsOMS.ltrim('hello ')).toBe('hello ');
});
});
describe('testStrpbrk', function ()
{
it('Testing strpbrk functionality', function ()
{
expect(jsOMS.strpbrk('This is a simple text.', 'ai')).toBe('is is a simple text.');
expect(jsOMS.strpbrk('This is a simple text.', 'mt')).toBe('mple text.');
expect(jsOMS.strpbrk('This is a simple text.', 'z')).toBe('');
});
});
describe('testSubstrCount', function ()
{
it('Testing substring cound functionality', function ()
{
expect(jsOMS.substr_count('This is a simple text.', 'is')).toBe(2);
expect(jsOMS.substr_count('This is a simple text.', 'text')).toBe(1);
expect(jsOMS.substr_count('This is a simple text.', 'imples')).toBe(0);
});
});
describe('testSpecialchars', function ()
{
it('Testing htmlspecialchars functionality', function ()
{
expect(jsOMS.htmlspecialchars('<a href="test">Test</a>')).toBe('&lt;a href=&quot;test&quot;&gt;Test&lt;/a&gt;');
});
});
});

View File

@ -1,12 +0,0 @@
describe('ValidateDateTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,12 +0,0 @@
describe('ValidateMathTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,12 +0,0 @@
describe('ValidateNumberTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,12 +0,0 @@
describe('ValidateStringTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}