Skip to content

test: add coverage for remaining public exports#100

Merged
with-heart merged 5 commits into
masterfrom
chore/add-webpack-tests
Jun 26, 2019
Merged

test: add coverage for remaining public exports#100
with-heart merged 5 commits into
masterfrom
chore/add-webpack-tests

Conversation

@with-heart

@with-heart with-heart commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator

🔬 The one where we test most of the functions

This PR adds basic unit tests for most remaining untested non-babel functions. Having test coverage will provide us some safety in doing work, refactoring, fixing docs, etc.

This PR does not test addBundleVisualizer due to the external dep require('webpack-bundle-analyzer'), which isn't installed and so cant' be mocked. Not sure how to handle that without adding it as a devDep, which feels so dumb. Any ideas?

It also doesn't test addPostcssPlugins because the function has external dependencies and is complex, so I'll follow-up with a PR later refactoring it some to make it more understandable and testable.

Completion

  • override
  • addBundleVisualizer (not tested, has unresolvable external dep on require('webpack-bundle-analyzer'))
  • addDecoratorsLegacy
  • addWebpackExternals
  • disableEsLint
  • addWebpackAlias
  • addWebpackResolve
  • addWebpackPlugin
  • adjustWorkbox
  • useEslintRc
  • enableEslintTypescript
  • addLessLoader
  • overrideDevServer
  • watchAll
  • disableChunk
  • addPostcssPlugins (not tested, will follow-up due to complexity and external deps)
  • removeModuleScopePlugin
  • addTslintLoader

@with-heart with-heart marked this pull request as ready for review June 26, 2019 01:10
@with-heart with-heart requested review from FezVrasta and arackaf June 26, 2019 01:13
@with-heart with-heart force-pushed the chore/add-webpack-tests branch from aa119de to 17ba2b4 Compare June 26, 2019 01:15
@arackaf

arackaf commented Jun 26, 2019

Copy link
Copy Markdown
Owner

@with-heart looks fine to me. I haven't touched this code in ages (I stopped using CRA ages ago). Ping @FezVrasta on any code reviews you want feedback on - or if he's moved on, too, then feel free to just merge.

@with-heart

Copy link
Copy Markdown
Collaborator Author

Gotcha. Good to know!

@arackaf

arackaf commented Jun 26, 2019

Copy link
Copy Markdown
Owner

If GitHub is set up to require a review, and you can't review it yourself, then let me know and I'll either remove that setting, or just rubber stamp shit for you (probably the former)

@with-heart

Copy link
Copy Markdown
Collaborator Author

Nope, I think everything is set. Haven't run into anything I feel like I'm missing the ability to do yet.

@with-heart with-heart merged commit 55cf147 into master Jun 26, 2019
@with-heart with-heart deleted the chore/add-webpack-tests branch June 26, 2019 11:38
@with-heart with-heart restored the chore/add-webpack-tests branch August 10, 2019 16:41
@with-heart with-heart deleted the chore/add-webpack-tests branch August 10, 2019 16:43
@with-heart with-heart restored the chore/add-webpack-tests branch September 4, 2019 15:47
@with-heart with-heart deleted the chore/add-webpack-tests branch September 4, 2019 15:47
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