Closed jahredhope closed 3 months ago
Latest commit: fae4aa02a40f25fd95033c3a9b706381f2bf84bf
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Can we add a snapshot of
.gitignore
in https://github.com/seek-oss/sku/blob/48ae90b810ff1b3fe9cdb18eb90d331d64539403/fixtures/sku-init/sku-init.test.js?
Yes good idea. But I'd prefer to go further and also snapshot package.json. Will update PR soon.
Fixes a situation when an incorrect path would be used for ignore files.
Previously you might get a list with whatever the users current directory was, minus the app name, with 'dist' on the end:
.gitignore
Now this value will just be
dist/
, as it would be if runningsku configure
.More information in changeset.
Changed
sku-init
test to also check generated files so we can potentially catch this in the future, and make changes to init steps with more confidence.I needed to special-case package.json as we don't want to update the snapshot when there are new dependency versions.
Whilst jest does support Property Matchers, I chose to implement this by just replacing the version as it's easier to still test WHICH dependencies were installed (regardless of the version), and IMO it's a cleaner snapshot.