-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
test: watch option snapshot #2679
base: master
Are you sure you want to change the base?
Conversation
.replace(/Hash: .*/gm, 'Hash: <hash>') | ||
.replace(/Time: .*/gm, 'Time: <compile time>') | ||
.replace(/Built at: .*/gm, 'Built at: <built time>'); | ||
}; |
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.
Put normalizeCompileTime
in normalizeV4Output
, ideally we should have two function normalizeStatsV4
and normalizeStatsV5
, v5 default output are simple so we should not have big problems here, If you need I can implement these functions so you will be able to continue adding snapshots and improve normalizeStats
function using regexps
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.
yep help appreciated, also something wrong with v4 snapshot, thanks!
test/utils/test-utils.js
Outdated
@@ -247,6 +247,17 @@ const normalizeError = (output) => { | |||
return output.replace(/SyntaxError: .+/, 'SyntaxError: <error-message>').replace(/\s+at .+(}|\)|\d)/gs, '\n at stack'); | |||
}; | |||
|
|||
const normalizeCompileTime = (output) => { | |||
return output.replace(/in \d+ ms/gm, 'in <compile time> ms').replace(); |
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.
explain your regexes :)
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.
yep better to add an explanation and some examples of what's being replaced
Incident with GitHub Actions https://www.githubstatus.com/, the universe does not want to let me finish at all webpack-dev-server |
Actions are always painful 😞 |
@anshumanv Can you rebase, I want to finish, so we will continue migrate on snapshots |
on it |
@alexander-akait done :) |
We need do some improvements for |
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.
could you rebase?
What kind of change does this PR introduce?
test
Did you add tests for your changes?
it is test
If relevant, did you update the documentation?
NA
Summary
snapshot testing for watch option/command
Does this PR introduce a breaking change?
no
Other information