-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: adds support for builds with cache #10
Conversation
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.
lgtm
@@ -13,7 +13,9 @@ test('it should correctly generated all required pino files', (t) => { | |||
const distFolder = resolve(__dirname, '../tmp/dist') | |||
|
|||
t.teardown(() => { | |||
spawnSync(`rm -rf ${distFolder}`) | |||
spawnSync(`rm -rf ${distFolder}`, { | |||
shell: true |
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.
why this change?
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.
That's because the command didn't locate correctly the rm
executable so the tmp dir was not deleted.
test/cached-build.test.js
Outdated
) | ||
} | ||
|
||
test('it should correctly generated all required pino files', (t) => { |
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.
test('it should correctly generated all required pino files', (t) => { | |
test('it should correctly generate all required pino files', (t) => { |
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.
How is this testing that the output is being cached? It looks like it's testing that the output is generated correctly the second time you run the build, but not that the cache is being used. Am I missing something?
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.
The caching is enabled in the webpack configuration and I'm testing that nothing breaks when it is enabled.
I've renamed the test to make the intent more clear.
test/cached-build.test.js
Outdated
}) | ||
}) | ||
|
||
runBuild(distFolder, () => { |
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.
add a check that this doesn't error
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.
done
fixes #3