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
23
tests/utils/getDomainFromUrl.spec.ts
Normal file
23
tests/utils/getDomainFromUrl.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import chai from 'chai';
|
||||
import getDomainFromUrl from '../../src/utils/getDomainFromUrl';
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
describe('getDomainFromUrl', function () {
|
||||
it('should be a function', function () {
|
||||
expect(getDomainFromUrl).to.be.a('function');
|
||||
});
|
||||
|
||||
it('should return the domain', function () {
|
||||
expect(getDomainFromUrl('http://google.com/something/very/secret')).to.equal(
|
||||
'http://google.com',
|
||||
);
|
||||
|
||||
expect(getDomainFromUrl('http://www.google.com/something/very/secret')).to.equal(
|
||||
'http://www.google.com',
|
||||
);
|
||||
|
||||
// This is not how it was imaged to work, but let's leave it here as a warning.
|
||||
expect(getDomainFromUrl('google.com/something/very/secret')).to.equal('google.com//very');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user