This commit is contained in:
David Walsh 2016-03-14 13:32:47 -05:00
Родитель 37d334486d
Коммит 5b17ac84df
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -96,6 +96,14 @@ describe('tests', function() {
});
it('ignoreSearch works properly', function() {
// Ensure URLs are modified when local and not modified when cross-origin
assert.equal('/images/logo.png', wpOfflineShell.ignoreSearch(new Request('/images/logo.png?preview')).pathname);
var crossOriginImage = 'https://davidwalsh.name/images/logo.png?preview';
assert.equal(crossOriginImage, wpOfflineShell.ignoreSearch(new Request(crossOriginImage)).toString());
});
it('Debug option works properly', function() {
// We don't want to muddle up the user's console if they option isn't on
console.log = console.warn = sinon.spy();