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

build: move test files to src/__tests__ in packages #2330

Merged
merged 1 commit into from
Feb 5, 2019

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Feb 4, 2019

  • Source files are compiled from src/{foo} to dist/{foo}, the same
    pattern is applied to test files too.

  • Both TypeScript sources and JavaScript output are stored in the same
    path relative to project root. This makes it much easier to refer
    to test fixtures.

This is a follow-up for 066d525 (#2283) and 91a37dc (#2316), see also #1636.

Out of scope: refactor project (app & extension) templates, I'll open another PR for that.

Checklist

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

@bajtos bajtos added the refactor label Feb 4, 2019
@bajtos bajtos added this to the February 2019 milestone milestone Feb 4, 2019
@bajtos bajtos self-assigned this Feb 4, 2019
@bajtos bajtos requested a review from jannyHou as a code owner February 4, 2019 07:58
Copy link
Contributor

@hacksparrow hacksparrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neater.

@bajtos bajtos force-pushed the refactor/test-dir-in-packages branch from bc883b5 to dcb7bdd Compare February 4, 2019 15:27
- Source files are compiled from `src/{foo}` to `dist/{foo}`, the same
  pattern is applied to test files too.

- Both TypeScript sources and JavaScript output are stored in the same
  path relative to project root. This makes it much easier to refer
  to test fixtures.

This is a follow-up for 066d525 and 91a37dc.
@bajtos bajtos force-pushed the refactor/test-dir-in-packages branch from dcb7bdd to ed590c8 Compare February 5, 2019 06:20
"packages/*/dist/__tests__/",
"packages/cli/test/",
"examples/*/dist/test/",
"examples/*/dist/__tests__/",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have made this change in the previous pull request. I think the drop in code coverage is caused by the fact that before, we were including test files in example projects in lines-to-be-covered. Test files usually have 100% coverage, which is skewing the coverage value upwards.

**coverage/coveralls ** — Coverage decreased (-0.8%) to 90.429%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants