kopia lustrzana https://gitlab.com/rysiekpl/libresilient
gun-ipfs: application/json content-type guessing implemented; plus a relevant test
rodzic
ebba7e26d9
commit
a9368d4394
|
@ -107,6 +107,12 @@ describe("plugin: gun-ipfs", () => {
|
|||
expect(self.log).toHaveBeenCalledWith('gun-ipfs', " +-- guessed contentType : text/javascript")
|
||||
self.log.mockClear()
|
||||
|
||||
try {
|
||||
await self.LibResilientPlugins[0].fetch(self.location.origin + '/test.json')
|
||||
} catch(e) {}
|
||||
expect(self.log).toHaveBeenCalledWith('gun-ipfs', " +-- guessed contentType : application/json")
|
||||
self.log.mockClear()
|
||||
|
||||
try {
|
||||
await self.LibResilientPlugins[0].fetch(self.location.origin + '/test.svg')
|
||||
} catch(e) {}
|
||||
|
|
|
@ -201,6 +201,9 @@ if (typeof window === 'undefined') {
|
|||
case 'js':
|
||||
contentType = 'text/javascript';
|
||||
break;
|
||||
case 'json':
|
||||
contentType = 'application/json';
|
||||
break;
|
||||
case 'svg':
|
||||
contentType = 'image/svg+xml';
|
||||
break;
|
||||
|
|
Ładowanie…
Reference in New Issue