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

feat: Babel Plugin - Mock css imports #1607

Merged
merged 4 commits into from
Nov 1, 2023

Conversation

bmingles
Copy link
Contributor

@bmingles bmingles commented Oct 31, 2023

Created a Babel transform plugin mockCssImportPlugin that transforms certain css imports into const expressions.

  • Replaces import of .module.css / .module.scss - with a const object literal containing a key / value of the module name
  • Replaces css imports of ?inline and ?raw with a const string literal matching the import path

The new plugin is configured as a plugin for babel-jest

resolves #1606

Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a260842) 46.68% compared to head (9b6bcd8) 46.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1607      +/-   ##
==========================================
- Coverage   46.68%   46.68%   -0.01%     
==========================================
  Files         583      583              
  Lines       36267    36267              
  Branches     9074     9074              
==========================================
- Hits        16933    16930       -3     
- Misses      19282    19285       +3     
  Partials       52       52              
Flag Coverage Δ
unit 46.68% <ø> (-0.01%) ⬇️

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

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmingles bmingles marked this pull request as ready for review October 31, 2023 15:14
@bmingles bmingles requested a review from mofojed October 31, 2023 15:14
@bmingles bmingles merged commit 787c542 into deephaven:main Nov 1, 2023
7 checks passed
@bmingles bmingles deleted the 1606-mock-css-imports branch November 1, 2023 13:40
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2023
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.

Babel Plugin - Mock css imports
2 participants