Question: Any projects based on this that ARE trying to be complete like JSDOM?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, react
調査の方向性
これはスコープを定めた変更ではなく探索的な問いであり、リポジトリのファイルやテストは挙げていません。まず LinkeDOM における Location、navigator.clipboard、Document.createRange() の扱いを確認し、その後、既存のプロジェクトと新しい polyfill 層のどちらが不足しているブラウザーの挙動を提供すべきかを判断してください。完了とみなすには、合意されたスコープと実装計画が必要です。
索引モデルが issue の本文から書いたものです。
説明
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!
- 主要言語
- HTML
- スター
- 2.1k
- フォーク
- 104
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebReflection/linkedom のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
WebReflection/linkedom#329 · コメント 5 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
WebReflection/linkedom#327 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
WebReflection/linkedom#326 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
WebReflection/linkedom#321 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebReflection/linkedom#318 · コメント 6 件 ·
WebReflection/linkedom の issue をすべて見る
似ている issue
-
area:dictation bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
uttrflow/uttrflow-swift#1584 ·
メンテナーはふだん 1 日以内に返信
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 78/100
jaegertracing/jaeger-ui#4512 ·
メンテナーはふだん 1 日以内に返信
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3849 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信