google / google/material-design-lite

Convert to AVA for testing

Open
#4,368 0 comments 0 reactions 0 assignees View on GitHub
research Testing Tooling
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

I recently started work on a new project and as I began I setup [AVA](https://github.com/avajs/ava) for unit tests. It has shown itself to be very simple to setup and use. I recommend we move to AVA for unit testing in V2.

A few quick benefits of the move are:
- Async test running available. Means multiple tests run at a time so things finish faster. Instead of syncronous testing as we do now where we wait for each sequence to finish.
- Super-lean syntax for writing only the minimal amount of code to get a test working.

We will need to investigate how our new component structure needs to be tested through. Currently due to some of the DOM manipulation we do we need this HTML page pulling the components in and running in context there for unit tests. The new component structure (once we have two or three elements moved over) will need to be assessed to see if it can be executed outside of a specific document context.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.