Skip to content

Commit

Permalink
fixed some typo in validator tests (#1792)
Browse files Browse the repository at this point in the history
fixed some typo in validator tests.
  • Loading branch information
Code-Hex committed Jul 5, 2022
1 parent 6a22063 commit dd2a61c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test/unit/utils/validator.spec.ts
Expand Up @@ -53,10 +53,10 @@ describe('isArray()', () => {
expect(isArray(undefined as any)).to.be.false;
});

const nonBooleans = [null, NaN, 0, 1, '', 'a', true, false, {}, { a: 1 }, _.noop];
nonBooleans.forEach((nonBoolean) => {
it('should return false given a non-array argument: ' + JSON.stringify(nonBoolean), () => {
expect(isArray(nonBoolean as any)).to.be.false;
const nonArrays = [null, NaN, 0, 1, '', 'a', true, false, {}, { a: 1 }, _.noop];
nonArrays.forEach((nonArray) => {
it('should return false given a non-array argument: ' + JSON.stringify(nonArray), () => {
expect(isArray(nonArray as any)).to.be.false;
});
});

Expand Down Expand Up @@ -84,10 +84,10 @@ describe('isNonEmptyArray()', () => {
expect(isNonEmptyArray(undefined as any)).to.be.false;
});

const nonBooleans = [null, NaN, 0, 1, '', 'a', true, false, {}, { a: 1 }, _.noop];
nonBooleans.forEach((nonBoolean) => {
it('should return false given a non-array argument: ' + JSON.stringify(nonBoolean), () => {
expect(isNonEmptyArray(nonBoolean as any)).to.be.false;
const nonArrays = [null, NaN, 0, 1, '', 'a', true, false, {}, { a: 1 }, _.noop];
nonArrays.forEach((nonArray) => {
it('should return false given a non-array argument: ' + JSON.stringify(nonArray), () => {
expect(isNonEmptyArray(nonArray as any)).to.be.false;
});
});

Expand Down Expand Up @@ -231,10 +231,10 @@ describe('isObject()', () => {
expect(isObject(undefined as any)).to.be.false;
});

const nonStrings = [NaN, 0, 1, true, false, '', 'a', _.noop];
nonStrings.forEach((nonString) => {
it('should return false given a non-object argument: ' + JSON.stringify(nonString), () => {
expect(isObject(nonString as any)).to.be.false;
const nonObjects = [NaN, 0, 1, true, false, '', 'a', _.noop];
nonObjects.forEach((nonObject) => {
it('should return false given a non-object argument: ' + JSON.stringify(nonObject), () => {
expect(isObject(nonObject as any)).to.be.false;
});
});

Expand Down Expand Up @@ -264,10 +264,10 @@ describe('isNonNullObject()', () => {
expect(isNonNullObject(undefined as any)).to.be.false;
});

const nonStrings = [NaN, 0, 1, true, false, '', 'a', _.noop];
nonStrings.forEach((nonString) => {
it('should return false given a non-object argument: ' + JSON.stringify(nonString), () => {
expect(isNonNullObject(nonString as any)).to.be.false;
const nonObjects = [NaN, 0, 1, true, false, '', 'a', _.noop];
nonObjects.forEach((nonObject) => {
it('should return false given a non-object argument: ' + JSON.stringify(nonObject), () => {
expect(isNonNullObject(nonObject as any)).to.be.false;
});
});

Expand Down

0 comments on commit dd2a61c

Please sign in to comment.