Skip to content

Conversation

stof
Copy link
Member

@stof stof commented Jul 6, 2017

Closes #48

@stof
Copy link
Member Author

stof commented Jul 6, 2017

AFAIK, we have no tests for the Encore layer itself currently (which might be related to the fact that it was not resettable btw), which is why there is no test changes currently.

@weaverryan
Copy link
Member

AFAIK, we have no tests for the Encore layer itself currently

Correct: specifically there is no test for index.js. I think it would be a good idea to create a smoke test - e.g. configure Encore with a few basic things, call getWebpackConfig(), reset it, configure a few other things and call getWebpackConfig() again (asserting very basic things on the config in both cases). If you can add that here, awesome. Otherwise, we can add it later - this is a pretty simple patch and doesn't affect any existing code.

@stof
Copy link
Member Author

stof commented Jul 6, 2017

getWebpackConfig is hard to test cleanly if you want to cover it all, as it calls process.exit. This would require actually using a subprocess. So I will leave it for later

@weaverryan
Copy link
Member

It only calls process.exit() if there is a validation error. So yea, testing that case is not worth it. But testing a successful case as a "smoke test" should not be too hard.

@weaverryan
Copy link
Member

Thanks Stof!

@weaverryan weaverryan merged commit f4c80e6 into symfony:master Jul 7, 2017
weaverryan added a commit that referenced this pull request Jul 7, 2017
This PR was merged into the master branch.

Discussion
----------

Allow resetting the state of the Encore singleton

Closes #48

Commits
-------

f4c80e6 Allow resetting the state of the Encore singleton
@stof stof deleted the reset branch January 30, 2019 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants