Skip to content

Commit

Permalink
test: 更新测试
Browse files Browse the repository at this point in the history
  • Loading branch information
蔡金锋 committed Jun 8, 2021
1 parent 3570b09 commit a92cad1
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion test/validator/isBankCard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isBankCard from '../../src/isBankCard'

describe('isBankCard', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isBankCard(true)).to.be.equal(false);
expect(isBankCard(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isBusinessLicense.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isBusinessLicense from '../../src/isBusinessLicense'

describe('isBusinessLicense', () => {
it('错误示例', () => {
it('非字符串', () => {
expect(isBusinessLicense(true)).to.be.equal(false);
expect(isBusinessLicense(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isChinese.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isChinese from '../../src/isChinese'

describe('isChinese', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isChinese(true)).to.be.equal(false);
expect(isChinese(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isEmail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isEmail from '../../src/isEmail'


describe('isEmail', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isEmail(true)).to.be.equal(false);
expect(isEmail(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isIPv4.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isIPv4 from '../../src/isIPv4'

describe('isIPv4', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isIPv4(true)).to.be.equal(false);
expect(isIPv4(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isIPv6.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isIPv6 from '../../src/isIPv6'

describe('isIPv6', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isIPv6(true)).to.be.equal(false);
expect(isIPv6(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isIdCard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isIdCard from '../../src/isIdCard'


describe('isIdCard', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isIdCard(true)).to.be.equal(false);
expect(isIdCard(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isMobile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isMobile from '../../src/isMobile'


describe('isMobile', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isMobile(true)).to.be.equal(false);
expect(isMobile(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isPassport.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isPassport from '../../src/isPassport'

describe('isPassport', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isPassport(true)).to.be.equal(false);
expect(isPassport(123)).to.be.equal(false);
});
Expand Down
20 changes: 10 additions & 10 deletions test/validator/isPassword.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ import {
import isPassword from '../../src/isPassword'

describe('isPassword', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isPassword(true)).to.be.equal(false);
expect(isPassword(123)).to.be.equal(false);
});
it('1级强度 "1234787" => true', () => {
expect(isPassword('1234787', {level: 1})).to.be.equal(true);
expect(isPassword('1234787', { level: 1 })).to.be.equal(true);
});
it('1级强度 "a1234787" => true', () => {
expect(isPassword('a1234787', {level: 1})).to.be.equal(true);
expect(isPassword('a1234787', { level: 1 })).to.be.equal(true);
});
it('1级强度 "ab1234787" => true', () => {
expect(isPassword('ab1234787', {level: 1})).to.be.equal(true);
expect(isPassword('ab1234787', { level: 1 })).to.be.equal(true);
});
it('1级强度 "1a234787" => true', () => {
expect(isPassword('1a234787', {level: 1})).to.be.equal(true);
expect(isPassword('1a234787', { level: 1 })).to.be.equal(true);
});
it('1级强度 "a1_234787" => true', () => {
expect(isPassword('a1_234787', {level: 1})).to.be.equal(true);
expect(isPassword('a1_234787', { level: 1 })).to.be.equal(true);
});
it('1级强度 "abc" => true', () => {
expect(isPassword('abc', {level: 1})).to.be.equal(true);
expect(isPassword('abc', { level: 1 })).to.be.equal(true);
});
it('1级强度 "*_ )" => false', () => {
expect(isPassword('*_ )', {level: 1})).to.be.equal(false);
expect(isPassword('*_ )', { level: 1 })).to.be.equal(false);
});
it('1级强度 "!@#$%^&*()-=_+[]\|{},./?<>~`" => true', () => {
expect(isPassword('!@#$%^&*()-=_+[]\|{},./?<>~`', {level: 1})).to.be.equal(true);
expect(isPassword('!@#$%^&*()-=_+[]\|{},./?<>~`', { level: 1 })).to.be.equal(true);
});
it('2级强度 "!@#$%^&*()-=_+[]\|{},./?<>~`" => false', () => {
expect(isPassword('!@#$%^&*()-=_+[]\|{},./?<>~`', {level: 2})).to.be.equal(false);
expect(isPassword('!@#$%^&*()-=_+[]\|{},./?<>~`', { level: 2 })).to.be.equal(false);
});

it('2级强度 "a12345678" => true', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isPostcode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isPostcode from '../../src/isPostcode'


describe('isPostcode', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isPostcode(true)).to.be.equal(false);
expect(isPostcode(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isQQ.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isQQ from '../../src/isQQ'

describe('isQQ', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isQQ(true)).to.be.equal(false);
expect(isQQ(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isSocialCreditCode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isSocialCreditCode from '../../src/isSocialCreditCode'

describe('isSocialCreditCode', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isSocialCreditCode(true)).to.be.equal(false);
expect(isSocialCreditCode(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isTelephone.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isTelephone from '../../src/isTelephone'


describe('isTelephone', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isTelephone(true)).to.be.equal(false);
expect(isTelephone(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isUrl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isUrl from '../../src/isUrl'

describe('isUrl', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isUrl([])).to.be.equal(false);
expect(isUrl({})).to.be.equal(false);
expect(isUrl(false)).to.be.equal(false);
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isVehicle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isVehicle from '../../src/isVehicle'


describe('isVehicle', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isVehicle(true)).to.be.equal(false);
expect(isVehicle(123)).to.be.equal(false);
});
Expand Down
2 changes: 1 addition & 1 deletion test/validator/isWX.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import isWX from '../../src/isWX'

describe('isWX', () => {
it('非字符串 => false', () => {
it('非字符串', () => {
expect(isWX(true)).to.be.equal(false);
expect(isWX(123)).to.be.equal(false);
});
Expand Down

0 comments on commit a92cad1

Please sign in to comment.