ZweiEuro
ZweiEuro
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
I also treid to find the error inside vitest repo to maybe reverse enginer it, but i cant find it
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
Even if i delete everything inside the file i am trying to import it throw this error so i am suspecting its not even the content and something else is really wrong
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
as far as i can tell the only thing here is Object.defineProperties(window, ... but even so, that should not trip any predefined things
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
if something is scanning all imports and looking for illegal statements i could work around em if they are listed somewhere
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
I got all the code, but i really don't want to throw this at you sinec you already said you are tight on time. https://gitlab.zweieuro.at/wui/core/web-user-interface-node/-/releases/v2.5.1 It essentially just does some custom stuff with global.window.<func here> its part of a big project i work on but that is essentially the API "out". But its fine if it is undefined.
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
..or am i not allowed to touch globalThis at all in any module otherwise its considered not compatible ?
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
I pretty much just wrote custom react hooks in that library. so i am guessing its a configuration problem ?
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
Hm... my code doesn'T use any node specific things that polyfill would fill, evne if i tried it with polyfill it fails.
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
I am comparing my package.json and library to one from jsdom that isn't throwing the error, but i see no difference
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
I've read through the docs but there is something blocking me from using this inside deno. I am getting this error with a library I wrote: link; It just says to "tell the maintainer", which is me, but I have no clue what vite expects here or if its some resolution problem with deno. I understand that might be just a vite issue, but maybe if you are familiar with it you can throw me some doc link of what this error is even referring to ?
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
NP, THX!
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
but my vite config came pre-configured with stuff for deno from the template, which i have no idea about
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
yeah i am reading through that rn
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
its not running a setujp file or anything else
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
would this work for starting vitest: "test": "deno test -A --node-modules-dir=auto npm:vitest" Kinda at a loss why it cant find any test files nad is generally not really doing anything and i am not sure if the how the root property interacts with deno and other options
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
thx a lot for the context !
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
tho i did loose a day trying to get this to run xD
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
hm, so it would be nice if there was a plugin for it i guess, but oh well, nohthing i can do about this now
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
Practically impossible to tell what is modern and not nowadays ._. everything is so fast and new anyways. Just glad deno makes me forget about babel
47 replies
DDeno
Created by ZweiEuro on 3/5/2025 in #help
Test using png mocks
Yeah, but i am only familiar with jest (and all the weird edge cases it has) so i was hoping deno would offer a proper alternative. I am fine with trying vitest though, guessing there is not much difference if i essentially use react-testing-lib for rendering anyways
47 replies