forked from Mirrors/doipjs
Replace URL with URI
This commit is contained in:
parent
43b16ffbaf
commit
cdbb0b1ef1
1 changed files with 6 additions and 6 deletions
|
@ -37,8 +37,8 @@ doipjs.serviceprovidersList.forEach((sp, i) => {
|
||||||
it('should be an object', () => {
|
it('should be an object', () => {
|
||||||
expect(doipjs.serviceproviders[sp]).to.be.a('object')
|
expect(doipjs.serviceproviders[sp]).to.be.a('object')
|
||||||
})
|
})
|
||||||
it('should have a RegExp instance named "reURL"', () => {
|
it('should have a RegExp instance named "reURI"', () => {
|
||||||
expect(doipjs.serviceproviders[sp].reURL).to.be.instanceof(RegExp)
|
expect(doipjs.serviceproviders[sp].reURI).to.be.instanceof(RegExp)
|
||||||
})
|
})
|
||||||
it('should have a function named "processURL" (2 arguments)', () => {
|
it('should have a function named "processURL" (2 arguments)', () => {
|
||||||
expect(doipjs.serviceproviders[sp].processURL).to.be.a('function')
|
expect(doipjs.serviceproviders[sp].processURL).to.be.a('function')
|
||||||
|
@ -50,12 +50,12 @@ doipjs.serviceprovidersList.forEach((sp, i) => {
|
||||||
|
|
||||||
doipjs.serviceproviders[sp].tests.forEach((test, j) => {
|
doipjs.serviceproviders[sp].tests.forEach((test, j) => {
|
||||||
if (test.shouldMatch) {
|
if (test.shouldMatch) {
|
||||||
it(`should match "${test.url}"`, () => {
|
it(`should match "${test.uri}"`, () => {
|
||||||
expect(doipjs.serviceproviders[sp].reURL.test(test.url)).to.be.true
|
expect(doipjs.serviceproviders[sp].reURI.test(test.uri)).to.be.true
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
it(`should not match "${test.url}"`, () => {
|
it(`should not match "${test.uri}"`, () => {
|
||||||
expect(doipjs.serviceproviders[sp].reURL.test(test.url)).to.be.false
|
expect(doipjs.serviceproviders[sp].reURI.test(test.uri)).to.be.false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue