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

Packages: Update Karma config for new structure #6281

Closed
swissspidy opened this issue Feb 9, 2021 · 1 comment
Closed

Packages: Update Karma config for new structure #6281

swissspidy opened this issue Feb 9, 2021 · 1 comment
Assignees
Labels
P3 Nice to have Type: Infrastructure Changes impacting testing infrastructure or build tooling

Comments

@swissspidy
Copy link
Collaborator

Feature Description

Our Karma configuration is currently a bit all over the place. Need to figure out how we can best improve this to make it more manageable.

  • Dashboard and editor both have a fixture.js file and they actually have quite some code duplication there (ComponentStub, actPromise, HookExecutor, etc.)
  • There's assets/src/karma-fixture which does a lot of different things:
    • Set up test-root for tests
    • Add virtual cursor
    • Add custom matchers inspired by jest, jest-dom, and axe
    • Add custom jasmine reporter to take snapshots
    • Implement pause/debug mode
    • Define describe.only & co (as if it were Jest), even though it's never actually used
    • Provide actual fixtures and component stub
  • Then there are the two karma configs for each project, which are also very similar

Alternatives Considered

Additional Context


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

Implementation Brief

@swissspidy swissspidy added Type: Infrastructure Changes impacting testing infrastructure or build tooling P3 Nice to have Pod: WP & Infra labels Feb 9, 2021
@swissspidy
Copy link
Collaborator Author

Just discussed with @sayedtaqui that we can go ahead with just moving this to a new package for now, basically resurrecting #6276. If we realize this needs a different structure later on, refactoring should be easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Nice to have Type: Infrastructure Changes impacting testing infrastructure or build tooling
Projects
None yet
Development

No branches or pull requests

2 participants