mirror of
https://github.com/tenrok/axios.git
synced 2026-05-27 14:47:43 +03:00
12 lines
389 B
JavaScript
12 lines
389 B
JavaScript
var urlIsSameOrigin = require('../../../lib/helpers/urlIsSameOrigin');
|
|
|
|
describe('helpers::urlIsSameOrigin', function () {
|
|
it('should detect same origin', function () {
|
|
expect(urlIsSameOrigin(window.location.href)).toEqual(true);
|
|
});
|
|
|
|
it('should detect different origin', function () {
|
|
expect(urlIsSameOrigin('https://github.com/mzabriskie/axios')).toEqual(false);
|
|
});
|
|
});
|