Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: 添加 nonebug 单元测试文档 #929

Merged
merged 16 commits into from
Apr 30, 2022
Merged

Docs: 添加 nonebug 单元测试文档 #929

merged 16 commits into from
Apr 30, 2022

Conversation

MingxuanGame
Copy link
Contributor

@MingxuanGame MingxuanGame commented Apr 17, 2022

包含了概览,测试事件响应操作,规则和权限操作,测试依赖注入测试事件预期响应和api调用,测试响应器预期操作和测试适配器
其他的因为社区开发大概率用不上所以没写 写了估计也用不上,有需求我再写
可能语法有疏漏的地方,也请多多指正修改

@codecov
Copy link

codecov bot commented Apr 17, 2022

Codecov Report

Merging #929 (120c99d) into master (dcfa25c) will increase coverage by 0.14%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #929      +/-   ##
==========================================
+ Coverage   77.14%   77.29%   +0.14%     
==========================================
  Files          42       42              
  Lines        3098     3096       -2     
==========================================
+ Hits         2390     2393       +3     
+ Misses        708      703       -5     
Flag Coverage Δ
unittests 77.29% <ø> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nonebot/internal/adapter/template.py 88.60% <0.00%> (+5.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcfa25c...120c99d. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 17, 2022

🚀 Deployed on https://deploy-preview-929--nonebot2.netlify.app

@github-actions github-actions bot temporarily deployed to pull request April 17, 2022 18:30 Inactive
@yanyongyu yanyongyu self-requested a review April 18, 2022 02:30
@yanyongyu yanyongyu added the documentation Improvements or additions to documentation label Apr 18, 2022
@yanyongyu
Copy link
Member

md里头部的frontmatter只要一个主入口指定menu option就够了,另外是有缩进的

options:
  menu:
    weight:
    category:

@MingxuanGame MingxuanGame marked this pull request as draft April 18, 2022 16:18
@github-actions github-actions bot temporarily deployed to pull request April 22, 2022 16:53 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 24, 2022 05:34 Inactive
@MingxuanGame MingxuanGame marked this pull request as ready for review April 24, 2022 09:02
Copy link
Member

@yanyongyu yanyongyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unittest/unittest.mdx 能否改个名字 unittest/README.mdx 然后在 frontmatter 里添加一下
slug: /advanced/unittest/

@github-actions github-actions bot temporarily deployed to pull request April 24, 2022 12:21 Inactive
website/docs/advanced/unittest/README.mdx Outdated Show resolved Hide resolved
website/docs/advanced/unittest/README.mdx Outdated Show resolved Hide resolved
website/docs/advanced/unittest/README.mdx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pull request April 24, 2022 14:06 Inactive
@yanyongyu
Copy link
Member

标题还是有解析错误啊 怪

image

Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request April 24, 2022 14:58 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 24, 2022 15:08 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 25, 2022 02:16 Inactive
@StarHeartHunt
Copy link
Member

标题还是有解析错误啊 怪

image

好像 mdx 在文件开头 import 的话自动解析 h1 会失效,看 docusaurus 的 mdx 都是用 title 单独指定。

@github-actions github-actions bot temporarily deployed to pull request April 25, 2022 02:39 Inactive
@yanyongyu
Copy link
Member

好像 mdx 在文件开头 import 的话自动解析 h1 会失效,看 docusaurus 的 mdx 都是用 title 单独指定。

import 多了好像会失效,但是一行就没问题,很怪

@github-actions github-actions bot temporarily deployed to pull request April 25, 2022 04:07 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 25, 2022 06:39 Inactive
@yanyongyu yanyongyu changed the title 📝 Add unittest docs Docs: 添加 nonebug 单元测试文档 Apr 30, 2022
@github-actions github-actions bot temporarily deployed to pull request April 30, 2022 04:28 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 30, 2022 05:32 Inactive
@yanyongyu yanyongyu merged commit 11b6e1b into nonebot:master Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

3 participants