fix tests

This commit is contained in:
Felix Roos 2022-06-27 23:52:02 +02:00
parent b55067ad60
commit cf564a7d06
3 changed files with 21 additions and 15 deletions

View File

@ -16,17 +16,18 @@ export * from './timespan.mjs';
export * from './util.mjs';
export * from './speak.mjs';
export { default as gist } from './gist.js';
import * as p from './package.json';
export const version = p.version;
// below won't work with runtime.mjs (json import fails)
/* import * as p from './package.json';
export const version = p.version; */
console.log(
'%c 🌀 @strudel.cycles/core version ' + version + ' 🌀',
'%c // 🌀 @strudel.cycles/core loaded 🌀', // keep "//" for runnable snapshot source..
'background-color: black;color:white;padding:4px;border-radius:15px',
);
if (window._strudelLoaded) {
if (globalThis._strudelLoaded) {
console.warn(
`@strudel.cycles/core was loaded more than once...
This might happen when you have multiple versions of strudel installed.
Please check with "npm ls @strudel.cycles/core".`,
);
}
window._strudelLoaded = true;
globalThis._strudelLoaded = true;

View File

@ -31,6 +31,8 @@ import '@strudel.cycles/xen/xen.mjs';
// import '@strudel.cycles/serial/serial.mjs';
// import controls from '@strudel.cycles/core/controls.mjs';
import { prebake } from './prebake.mjs';
class MockedNode {
chain() {
return this;
@ -121,6 +123,7 @@ const uiHelpersMocked = {
backgroundImage: id,
};
prebake();
// TODO: refactor to evalScope
extend(

File diff suppressed because one or more lines are too long