You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignore private properties returned by resolveConfig in the snapshot tests and make the ordering of keys stable.
Note
Stylelint has a omitPrivateProperties utility to ignore private properties when stringifying config to JSON for printing with --print-config in the CLI
Why
Snapshot tests keep an eye on the config created by our own rules and those of the config we extend. They run Stylelint's resolveConfig, which returns not only the public list of rules and plugins, but also private properties used internally by Stylelint.
These tests shouldn't break if Stylelint decides to update how it functions internally, so we should be resilient to changes in private properties and ordering of the keys in the generated config.
Done when
Snapshot ignores Stylelint's private properties in the config and use a consistent order for the keys
What
Ignore private properties returned by
resolveConfigin the snapshot tests and make the ordering of keys stable.Note
Stylelint has a
omitPrivatePropertiesutility to ignore private properties when stringifying config to JSON for printing with--print-configin the CLIWhy
Snapshot tests keep an eye on the config created by our own rules and those of the config we extend. They run Stylelint's
resolveConfig, which returns not only the public list of rules and plugins, but also private properties used internally by Stylelint.These tests shouldn't break if Stylelint decides to update how it functions internally, so we should be resilient to changes in private properties and ordering of the keys in the generated config.
Done when