Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some typo in validator tests #1792

Merged
merged 2 commits into from Jul 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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