Propmt when a api key can not be use + house keeping (#173)
* chore: remove old files * chore: change JS tests to TS, delete dummy tests * chore: bump manifests version
This commit is contained in:
committed by
GitHub
parent
fe49f50b65
commit
35543489e5
24
tests/utils/contains.spec.ts
Normal file
24
tests/utils/contains.spec.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import chai from 'chai';
|
||||
import contains from '../../src/utils/contains';
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
describe('contains', function () {
|
||||
it('should be a function', function () {
|
||||
expect(contains).to.be.a('function');
|
||||
});
|
||||
|
||||
it('should match url against blacklist and return true', function () {
|
||||
const list = 'localhost\ntest.com';
|
||||
|
||||
const url = 'http://localhost/fooapp';
|
||||
expect(contains(url, list)).to.equal(true);
|
||||
});
|
||||
|
||||
it('should not match url against blacklist and return false', function () {
|
||||
const list = 'localhost2\ntest.com';
|
||||
|
||||
const url = 'http://localhost/fooapp';
|
||||
expect(contains(url, list)).to.equal(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user