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
{{ message }}
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
Right now the snapshot test does not run on windows, because the path matching in the normalize helper fails to match for windows paths.
The details in the normalizer work on all strings matching a base path. This needs to convert backslashes as well and not only remove the common base path.
Problem
I think a few things about this are awkward:
Replacing strings by regexp in a serialized json object could match other things and not only paths.
Converting all backslashes for 'kind-of'-paths is not that easy and would increase complexity a lot
This is 'patching' the test results before snapshoting them. This means to create code for just the tests to have them more stable which is contraproductive and could lead to fixing the testcode instead of bugs.
Snapshots per se are more useful to detect if something has changed, but unit tests should be there do define whats expected. Right now the expectation in the untool tests with snapshots is not clear.
Solution
Rewrite the tests using snapshots into more explicit tests.
Maybe convert the tests to jest instead of use ava since the expect output is somewhat better
The text was updated successfully, but these errors were encountered:
I love (most of) this. Having better tests is something we were keen on for a very long time. It will be quite a bit of work to render the snapshots obsolete, but it will certainly be worthwhile.
We decided not to focus on Windows support for developing untool because at XING, that is not an officially supported development environment, but sure, why not.
As to switching to Jest, the reasoning appears to be a bit weak, and also, I am personally partial to Ava...
Reason
Right now the snapshot test does not run on windows, because the path matching in the normalize helper fails to match for windows paths.
The details in the normalizer work on all strings matching a base path. This needs to convert backslashes as well and not only remove the common base path.
Problem
I think a few things about this are awkward:
Solution
jest
instead of useava
since the expect output is somewhat betterThe text was updated successfully, but these errors were encountered: