Update prettier and reformat code
This commit is contained in:
package-lock.jsonpackage.json
src
ControlPanel.ts
Dashboard
Handler
Helpers
Page
Queue
Scheduler.tsStatistics.tsStorage
TaskQueueRenderer.tsVillage
tests
@@ -2,36 +2,36 @@ import { it, describe } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { elClassId, getNumber } from '../../src/Helpers/Convert';
|
||||
|
||||
describe('Utils', function() {
|
||||
describe('getNumber', function() {
|
||||
it('Can parse positive number', function() {
|
||||
describe('Utils', function () {
|
||||
describe('getNumber', function () {
|
||||
it('Can parse positive number', function () {
|
||||
const text = '123';
|
||||
expect(getNumber(text)).to.be.equals(123);
|
||||
});
|
||||
|
||||
it('Can parse positive number with noise', function() {
|
||||
it('Can parse positive number with noise', function () {
|
||||
const text = ' 123 ';
|
||||
expect(getNumber(text)).to.be.equals(123);
|
||||
});
|
||||
|
||||
it('Can parse negative number', function() {
|
||||
it('Can parse negative number', function () {
|
||||
const text = '-146';
|
||||
expect(getNumber(text)).to.be.equals(-146);
|
||||
});
|
||||
|
||||
it('Can parse negative number with minus sign', function() {
|
||||
it('Can parse negative number with minus sign', function () {
|
||||
const text = '\u2212132';
|
||||
expect(getNumber(text)).to.be.equals(-132);
|
||||
});
|
||||
});
|
||||
|
||||
describe('elClassId', function() {
|
||||
it('Can parse number with prefix', function() {
|
||||
describe('elClassId', function () {
|
||||
it('Can parse number with prefix', function () {
|
||||
const text = 'foo bar12 baz';
|
||||
expect(elClassId(text, 'bar')).to.be.equals(12);
|
||||
});
|
||||
|
||||
it('Can parse number from parts with same prefix', function() {
|
||||
it('Can parse number from parts with same prefix', function () {
|
||||
const text = 'foo12 foobar';
|
||||
expect(elClassId(text, 'foo')).to.be.equals(12);
|
||||
});
|
||||
|
@@ -2,28 +2,28 @@ import { it, describe } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { path, uniqPaths } from '../../src/Helpers/Path';
|
||||
|
||||
describe('Path', function() {
|
||||
it('Can build path with empty query', function() {
|
||||
describe('Path', function () {
|
||||
it('Can build path with empty query', function () {
|
||||
const p = path('/info.php');
|
||||
expect(p).to.be.equals('/info.php');
|
||||
});
|
||||
|
||||
it('Can build path with query', function() {
|
||||
it('Can build path with query', function () {
|
||||
const p = path('/info.php', { foo: 'bar' });
|
||||
expect(p).to.be.equals('/info.php?foo=bar');
|
||||
});
|
||||
|
||||
it('Can build path with complex query', function() {
|
||||
it('Can build path with complex query', function () {
|
||||
const p = path('/info.php', { a: 'x', b: 'y', c: 5 });
|
||||
expect(p).to.be.equals('/info.php?a=x&b=y&c=5');
|
||||
});
|
||||
|
||||
it('Can build path with query (undefined part)', function() {
|
||||
it('Can build path with query (undefined part)', function () {
|
||||
const p = path('/info.php', { foo: 'bar', foobar: undefined });
|
||||
expect(p).to.be.equals('/info.php?foo=bar');
|
||||
});
|
||||
|
||||
it('Can keep uniq paths', function() {
|
||||
it('Can keep uniq paths', function () {
|
||||
const p1 = { name: '/info.php', query: { a: 'b' } };
|
||||
const p2 = { name: '/info.php', query: { a: 'b' } };
|
||||
const up = uniqPaths([p1, p2]);
|
||||
|
Reference in New Issue
Block a user