Bare headless test proxy for packages
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
Compare the linked Meteor Community Packages examples, then use the issue's package.json as the starting point for a new example in this repository. Include the described headless test, lint, setup, and documentation tooling, and add a README explaining the stack, setup, and usage; the example should be usable as a bare package test proxy.
由索引模型根据 Issue 内容生成。
描述
A very common and repeatedly encountered usecase is to create a bare project within a Meteor package that is used to manage headless mocha tests. There are multiple advantages:
- the proxy projects allows to install and manage puppeteer for headless mocha tests
- the proxy project allows to install and manage additional test tools, such as
chaiandsinon, helping to avoidNpm.dependsinpackage.js - it automatically integrates with dependabot on GitHub for the (dev-/test-) dependencies installed in the proxy project
- the proxy project allows to install and execute lint tools, such as oxlint or biome and other custom scripts (for example for docs generation) via npm
scriptssection, providing a neat way to include dev/test/docs tooling for package repos
The project itself contains no js files but just the package.json. Multiple examples can be found in Meteor Community Packages Repos, for example:
- https://github.com/Meteor-Community-Packages/meteor-roles
- https://github.com/Meteor-Community-Packages/meteor-schema-index
- https://github.com/Meteor-Community-Packages/meteor-collection2
- https://github.com/Meteor-Community-Packages/meteor-mocha
- https://github.com/Meteor-Community-Packages/react-router-ssr
- https://github.com/Meteor-Community-Packages/meteor-collection-hooks
- ...and many more
Here is a slightly modified example package.json from meteor roles:
{
"name": "testapp2",
"private": true,
"scripts": {
"setup": "mkdir -p packages && ln -sfn ../../ ./packages/meteor-roles",
"test": "TEST_BROWSER_DRIVER=puppeteer meteor test-packages --raw-logs --once --driver-package meteortesting:mocha ./packages/meteor-roles",
"test:watch": "TEST_BROWSER_DRIVER=puppeteer TEST_WATCH=1 meteor test-packages --raw-logs --driver-package meteortesting:mocha ./packages/meteor-roles",
"test:coverage": "TEST_BROWSER_DRIVER=puppeteer TEST_CLIENT=1 TEST_SERVER=1 COVERAGE=1 COVERAGE_OUT_JSON=1 COVERAGE_OUT_HTML=1 COVERAGE_APP_FOLDER=$(pwd)/ meteor test-packages --raw-logs --once --driver-package meteortesting:mocha ./packages/meteor-roles",
"report": "nyc report -t .coverage",
"lint": "standard ../",
"lint:fix": "standard --fix ../"
},
"dependencies": {
"@babel/runtime": "7.25.6",
"meteor-node-stubs": "1.2.9",
"yuidocjs": "0.10.2"
},
"devDependencies": {
"babel-plugin-istanbul": "^6.1.1",
"chai": "^4.5.0",
"chai-as-promised": "^7.1.2",
"nyc": "^15.1.0",
"puppeteer": "^19.11.1",
"standard": "^17.1.0"
},
"babel": {
"env": {
"COVERAGE": {
"plugins": [
"istanbul"
]
}
}
},
"standard": {
"ignore": [
"**/.meteor/",
"**/examples/",
"**/testapp2",
"**/testapp3",
"**/docs"
]
}
}
Such an example project could include..
- the latest puppeteer, chai, and sinon as headless test-stack (note that
meteortesting:mochawould still be needed as package.js level dependency) - oxlint (since many seem to favor it over biome) with some good Meteor-specific defaults
- a bunch of useful scripts to setup and run lint and tests in several modes
- a useful README that explains the stack, setup, and usage
- what else?
Is this a useful candidate for examples?
- 主要语言
- JavaScript
- 星标
- 143
- 派生
- 59
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 4
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
meteor/examples 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
相似的 Issue
-
01 type: bug 41 lvl: easy
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
accessibility bug dark-mode dashboards
难度 1/5 1 小时以内 新手友好度 84/100
quarto-dev/quarto-cli#15447 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 1/5 1 小时以内 新手友好度 78/100
521xueweihan/HelloGitHub#4655 ·
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount due可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复