Skip to content

Commit dd2a61c

Browse files
authored
fixed some typo in validator tests (#1792)
fixed some typo in validator tests.
1 parent 6a22063 commit dd2a61c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

test/unit/utils/validator.spec.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ describe('isArray()', () => {
5353
expect(isArray(undefined as any)).to.be.false;
5454
});
5555

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)