Closed tommoor closed 3 years ago
Thanks @tommoor
Took me some time to figure this out..
This module uses the Yjs testing framework to automatically generate test cases. This testing framework uses the .mjs module in yjs/src/index.js. But when requiring the yjs
module, it resolves to yjs/dist/yjs.cjs. So we include the same library twice, which leads to fails when checking inheritance.
This would normally not be a problem. You can include Yjs several times without a problem. But you can't compare two different Yjs structures that were created using different yjs dependencies.
Anyway. It's fixed. I should document my work environment more...
Now you should just be able to clone this package and run npm run debug
(browser debugging) or npm test
for testing in nodejs (simulates the dom to run prosemirror).
Great stuff, sorry I was no use in tracking down the core of the problem myself. The test failures aren't terribly useful with this framework you're using.
Sidenote: Do you have something against running the tests in CI here on GitHub? There are lots of free options for open source that would improve confidence in the project to see ✅ passing tests on PR's.
Describe the bug
npm run test
fails on master, because tests run as part ofprepublish
it's not possible to publish the project. Seems similar to #25.To Reproduce Steps to reproduce the behavior:
git clone https://github.com/yjs/y-prosemirror.git
cd y-prosemirror
npm install
npm run test
Expected behavior Tests on master should pass.
Screenshots
Environment Information