Skip to content
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

better codecov configuration #89

Open
boneskull opened this issue Feb 24, 2020 · 2 comments
Open

better codecov configuration #89

boneskull opened this issue Feb 24, 2020 · 2 comments
Labels
chore Related to tests, packaging, build, releases, etc. help wanted Extra attention is needed

Comments

@boneskull
Copy link
Contributor

We're getting some coverage failures where, ideally, we shouldn't be. if we're adding .mdx files, that should not affect code coverage. if we're editing .yaml, that should not affect code coverage.

stuff to ignore:

  • package/docs/**/*
  • scripts/**/*

other?

@boneskull boneskull added help wanted Extra attention is needed chore Related to tests, packaging, build, releases, etc. labels Feb 24, 2020
@boneskull
Copy link
Contributor Author

boneskull commented Feb 27, 2020

I think this is related to #26

Essentially, the tests are running some stuff via modules, and other stuff via dist files. Because of this rule, we're avoiding loading ES modules when we do e.g., import foo from '@report-toolkit/common'. But in the tests, we load ES modules directly and shim via esm`.

admittedly, these aren't things that should be mixed and matched, but it was the quickest way to get some unit tests written using ESM.

I was not able to configure esm to use module as a mainFields item (we get some other errors coming out of unexpected). If we can get that to work, it wouldn't require a change to our codebase, since import foo from '@report-toolkit/common' will look into the package's module field, which will load the correct source module.

The issue may actually be in unexpected-rxjs as it looks like the error coming out of unexpected is related to plugins.

@boneskull boneskull removed the help wanted Extra attention is needed label Feb 27, 2020
@boneskull
Copy link
Contributor Author

another issue is that the e2e cli tests should use the actual distfile, which will also potentially cause coverage weirdness.

nyc is able to understand, but codecov isn't. maybe a mapping is needed in the codecov.yml? don't know

@boneskull boneskull added the help wanted Extra attention is needed label Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to tests, packaging, build, releases, etc. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant