`replaceEsm` breaks usage of mongo db
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, mongodb, node.js
- Lĩnh vực
- databases, testing-qa
Hướng nghiên cứu
Start with the linked minimal repository and reproduce the interaction between replaceEsm, imports in beforeEach, and Mongo queries. Compare calls from module A with calls from module C, then confirm the fix by showing that module A's queries return results while its dependency is replaced.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Using replaceEsm breaks usage of Mongo in the files under test
Issue
See repo for details. I have a module, A with a dependency on another module, B. Module A queries Mongo DB. When testing module A, I call replaceEsm('path/to/B') and this causes all queries to Mongo in module A to return nothing. However, I also have another module C which also queries Mongo. If I make calls to module C from the tests of module A, the mongo queries work as expected.
It seems there might be an issue with replaceEsm + imports in beforeEach + mongo db.
Environment
-
node -voutput: v17.6.0 -
npm -v(oryarn --version) output: 8.5.1 -
npm ls testdouble(oryarn list testdouble) version:
example@ /Users/paymahn/code/tripvector/example
└── [email protected]
Example Repo
Here's a minimal repo: https://github.com/paymog/testdouble-example
- Ngôn ngữ chính
- JavaScript
- Star
- 1.4k
- Fork
- 140
- Merge trung bình
- 5 giờ 55 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của testdouble/testdouble.js
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
testdouble/testdouble.js#538 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
testdouble/testdouble.js#537 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
testdouble/testdouble.js#536 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
testdouble/testdouble.js#534 ·
-
`npm-run-all` to `npm-run-all2`Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
testdouble/testdouble.js#533 ·
Tất cả issue của testdouble/testdouble.js
Issue tương tự
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stac-utils/stac-fields#42 ·
-
[sec-check] SVG remote-reference gate misses src attributes, link hrefs and bare-string @importĐang mởagent/security hive/hosted-available-lke648397-260827-5n31 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix #3381 does not fix #3343: watch() returns the ref, not the value, so setup() never re-runsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Eurosport 1 PolskaĐang mởchannels:add check:passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày