-
Notifications
You must be signed in to change notification settings - Fork 89
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
Migrate most tests to the module system #2003
Conversation
spec/core_functions/color/darken.hrx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For functions like this that are just translated into other, more general functions, it probably makes sense to omit them from the new module system tests entirely and have a small global test to verify that the name still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the detailed tests for the color.adjust
shorthands. The basic tests for the global versions are already in spec/core_functions/global/color
and spec/core_functions/color/adjust_color/error/missing_globals
tests that the functions that were removed or changed names in the module system don't exist in the color
module.
This migrates most tests that aren't explicitly testing
@import
or global built-in functions to instead use@use
and thesass:
modules.This was done using a combination of a new
migrate.ts
script that can run the Sass migrator over a spec directory and some manual changes and refactorings. There are probably some tests that could have been migrated that this misses because there were some directories I avoided running the migrator over to avoid accidentally changing a test that's actually explicitly testing@import
, but this should at least minimize additional migration and new warnings we need to add when we actually deprecate@import
and global built-in functions.The
spec/core_functions/module
directory has been replaced withspec/core_functions/global
, which similarly contains minimal tests for the global versions of each built-in function now that their full functionality is tested using the module system versions.