add shared tunes test
This commit is contained in:
parent
f829f35cfa
commit
ed44f4ed0c
4 changed files with 6375 additions and 0 deletions
|
|
@ -109,6 +109,10 @@ export const samples = async (sampleMap, baseUrl = sampleMap._base || '') => {
|
|||
sampleMap = `https://raw.githubusercontent.com/${path}/strudel.json`;
|
||||
}
|
||||
const base = sampleMap.split('/').slice(0, -1).join('/');
|
||||
if (typeof fetch === 'undefined') {
|
||||
// skip fetch when in node / testing
|
||||
return;
|
||||
}
|
||||
return fetch(sampleMap)
|
||||
.then((res) => res.json())
|
||||
.then((json) => samples(json, baseUrl || json._base || base))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue