Question: Any projects based on this that ARE trying to be complete like JSDOM?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
Direzione di ricerca
Questa è una domanda esplorativa, non una modifica con un ambito definito, e non indica alcun file o test del repository. Inizia esaminando la gestione di Location, navigator.clipboard e Document.createRange() da parte di LinkeDOM, quindi determina se un progetto esistente o un nuovo livello di polyfill debba fornire il comportamento mancante del browser. Per considerarla completata sarebbe necessario concordare l’ambito e il piano di implementazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is a cool project! Context: I'm dealing right now with trying to figure out how to have tests for React components that don't take forever to run, can live in a clean plain old node environment instead of Jest's parallel universe, use tap's API instead of the code poetry like expect(thing).toHave.something('i can never remember this junk').that.isnt.Null(), etc.
I have it working now, but the big bottleneck is jsdom. Every component test takes like 5-10 seconds to spin up, at minimum, for a test that runs in 50ms or less. If they do anything interesting with the dom (which a lot of them do), it gets much worse. I'm starting to see why jest runs tests in the parallel universe that it does.
It seems like @testing-library/react and @testing-library/userevents can almost work, but there are some missing pieces (by design, I realize). I totally understand not wanting to add those pieces to linkedom, and agree with that principle entirely.
So the question is, is there a project you're aware of that uses linkedom under the hood, but then does add that extra stuff? Some of what seem to be missing that I've run into:
- Location isn't set. (Can kinda hack around it by setting
window.locationto a URL object, which is close enough, but a proper Location polyfill would obviously be needed for anything doing actual navigation.) - Navigator has userAgent, but
navigator.clipboardis missing. - Document.createRange() returns an object that doen'st have setStart and setEnd methods.
I'm thinking it'd be possible to create a set of polyfills for all these things, and probably end up with something that would really only lack some of the finer points of JSDOM's tree structure, but still be close enough to simulate a browser for react testing.
Is someone doing this already? Or, if not, is there some reason you know of why linkedom isn't a suitable base for something like this?
Thanks!
- Lingua principale
- HTML
- Stelle
- 2.1k
- Fork
- 104
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WebReflection/linkedom
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
WebReflection/linkedom#329 · 5 commenti ·
-
`el.style.property = ''` and `e.style.setProperty('property', '')` should delete the property Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
WebReflection/linkedom#327 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
WebReflection/linkedom#326 · 5 commenti ·
-
Build Apps For AI Agent. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
WebReflection/linkedom#321 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
WebReflection/linkedom#318 · 5 commenti ·
Tutte le issue di WebReflection/linkedom
Issue simili
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
bug follow-up-work-in-progress from-review-extraction llm-providers python severity:should-fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
bug core
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
[Duplicate Code] Share the Cloud Hypervisor network-plan fixture between launch and config tests Apertacode-quality refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
github/gh-aw-firewall#8974 ·