apply eslint and prettier rules

This commit is contained in:
Sebastian Sdorra
2019-10-21 10:57:56 +02:00
parent 85773186db
commit 4bb8e6153b
227 changed files with 1147 additions and 4076 deletions

View File

@@ -19,7 +19,7 @@ describe("test name validation", () => {
"!!!",
"!_!"
];
for (let name of invalidNames) {
for (const name of invalidNames) {
it(`should return false for '${name}'`, () => {
expect(validator.isNameValid(name)).toBe(false);
});
@@ -42,7 +42,7 @@ describe("test name validation", () => {
"this.one_as-well",
"and@this"
];
for (let name of validNames) {
for (const name of validNames) {
it(`should return true for '${name}'`, () => {
expect(validator.isNameValid(name)).toBe(true);
});
@@ -59,7 +59,7 @@ describe("test mail validation", () => {
"s.sdorra@ ostfalia.de",
"s.sdorra@[ostfalia.de"
];
for (let mail of invalid) {
for (const mail of invalid) {
it(`should return false for '${mail}'`, () => {
expect(validator.isMailValid(mail)).toBe(false);
});
@@ -78,7 +78,7 @@ describe("test mail validation", () => {
"s'sdorra@scm.solutions",
'"S Sdorra"@scm.solutions'
];
for (let mail of valid) {
for (const mail of valid) {
it(`should return true for '${mail}'`, () => {
expect(validator.isMailValid(mail)).toBe(true);
});
@@ -87,13 +87,13 @@ describe("test mail validation", () => {
describe("test number validation", () => {
const invalid = ["1a", "35gu", "dj6", "45,5", "test"];
for (let number of invalid) {
for (const number of invalid) {
it(`should return false for '${number}'`, () => {
expect(validator.isNumberValid(number)).toBe(false);
});
}
const valid = ["1", "35", "2", "235", "34.4"];
for (let number of valid) {
for (const number of valid) {
it(`should return true for '${number}'`, () => {
expect(validator.isNumberValid(number)).toBe(true);
});
@@ -102,13 +102,13 @@ describe("test number validation", () => {
describe("test path validation", () => {
const invalid = ["//", "some//path", "end//"];
for (let path of invalid) {
for (const path of invalid) {
it(`should return false for '${path}'`, () => {
expect(validator.isPathValid(path)).toBe(false);
});
}
const valid = ["", "/", "dir", "some/path", "end/"];
for (let path of valid) {
for (const path of valid) {
it(`should return true for '${path}'`, () => {
expect(validator.isPathValid(path)).toBe(true);
});