Skip to content

Conversation

matthewbastien
Copy link
Member

@matthewbastien matthewbastien commented Sep 2, 2025

Description

Add a new tag() function that can be used to add three different tags to tests or suites:

  • small: Used mainly for unit tests. (2 second timeout)
  • medium: Used for most integration tests. (2 minute timeout)
  • large: Used for long running tests that will run only in Nightly test runs. (10 minute timeout)

When tagging a suite all child suites and tests will inherit the same tag(s) unless otherwise specified. For example:

tag("medium").suite("A suite that contains medium sized tests by default", () => {
    tag("large").test("Explicitly applies the large tag to the test", () => {
        // timeout: 10 minutes
    });

    test("Inherits the default tag of medium from the suite", () => {
        // timeout: 2 minutes
    });

    suite("All tests in this suite will also inherit the medium tag", () => {
        // timeout: 2 minutes
    });
});

The large tag replaces the @slow label that we used to add to all of our nightly-only tests.

I've also added a couple other QoL improvements:

  • Imports will now be sorted using Prettier to keep imports consistent between all files.
  • Tests can now import sources using @src instead of having to do ../../../../src.

Tasks

  • Required tests have been written
  • [ ] Documentation has been updated
  • [ ] Added an entry to CHANGELOG.md if applicable

@matthewbastien matthewbastien added the full-test-run Perform a full test suite run. Apply this label before pushing up a PR or commit label Sep 2, 2025
@matthewbastien matthewbastien force-pushed the improve-test-workflow branch 9 times, most recently from 7dbe868 to 9501d98 Compare September 3, 2025 15:33
@matthewbastien matthewbastien changed the title Add the concept of test tags to set timeouts QoL improvements to our testing framework Sep 3, 2025
@matthewbastien matthewbastien force-pushed the improve-test-workflow branch 5 times, most recently from 644e2e9 to 21f0dac Compare September 3, 2025 17:58
@matthewbastien matthewbastien marked this pull request as ready for review September 3, 2025 18:02
@matthewbastien matthewbastien force-pushed the improve-test-workflow branch 3 times, most recently from b5b5b34 to dd0bbca Compare September 4, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-test-run Perform a full test suite run. Apply this label before pushing up a PR or commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants