Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

feat: support generate jest #66

Merged
merged 5 commits into from
Aug 26, 2022
Merged

Conversation

miracles1919
Copy link

借鉴了下 umi 的实现

@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

Merging #66 (a8c4f12) into master (fd86705) will decrease coverage by 0.72%.
The diff coverage is 82.81%.

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   95.70%   94.97%   -0.73%     
==========================================
  Files          43       45       +2     
  Lines        1071     1135      +64     
  Branches      236      266      +30     
==========================================
+ Hits         1025     1078      +53     
- Misses         45       56      +11     
  Partials        1        1              
Impacted Files Coverage Δ
src/preset.ts 100.00% <ø> (ø)
src/commands/generators/utils.ts 65.51% <65.51%> (ø)
src/commands/generators/jest.ts 97.14% <97.14%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

src/commands/generators/jest.ts Outdated Show resolved Hide resolved
src/commands/generators/jest.ts Outdated Show resolved Hide resolved
src/commands/generators/jest.test.ts Outdated Show resolved Hide resolved
logger.info('Write jest-setup.ts');
}

const collectCoverageFrom = hasSrc
Copy link
Member

Choose a reason for hiding this comment

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

father 没有 Umi 的约定式路由逻辑、不用判断 hasSrc,部分值应该也用不到,可能这些就够了:

[
  'src/**/*.{ts,js,tsx,jsx}',
]

如果 devDependencies 里存在 dumi,需要加上这几项:

[
    '!src/.umi/**',
    '!src/.umi-test/**',
    '!src/.umi-production/**',
]

Copy link
Member

@PeachScript PeachScript left a comment

Choose a reason for hiding this comment

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

+1

@PeachScript PeachScript merged commit 274b6e0 into umijs:master Aug 26, 2022
@PeachScript PeachScript mentioned this pull request Aug 26, 2022
71 tasks
PeachScript pushed a commit to umijs/father that referenced this pull request Aug 26, 2022
* feat: support generate jest

* test: add generate jest test

* refactor: adjust jest.config

* chore: move to tests

* feat: add dumi cov and remove umi cov
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants