Merge pull request #243 from tidalcycles/shared-tests
snapshot tests on shared snippets
This commit is contained in:
commit
c3d6de2412
8 changed files with 7002 additions and 1 deletions
|
|
@ -113,6 +113,10 @@ export const samples = async (sampleMap, baseUrl = sampleMap._base || '') => {
|
|||
return;
|
||||
}
|
||||
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