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

Bump Jest timeout for SCSS compilation tests #222

Merged
merged 1 commit into from
May 26, 2021

Conversation

aduth
Copy link
Member

@aduth aduth commented May 25, 2021

Why: So that the build doesn't fail by exceeding the default timeout of 5 seconds, where allowing the compilation to complete would otherwise succeed.

We should revisit the fact that this test is as slow as it is in the first place, possibly:

  • Replacing gulp-sass compiler (using node-sass under the hood) with Dart-based SASS (benchmarks, e.g. currently-experimental sass-embedded)
  • Combining tests
  • Limiting what we need to import to verify the expected behavior (vs. entire USWDS)

**Why**: So that the build doesn't fail by exceeding the default timeout of 5 seconds, where allowing the compilation to complete would otherwise succeed.
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -9,7 +9,7 @@ test('scss files can be imported without node_modules', async () => {
});

expect(results.css.toString('utf-8')).toMatch(/\.usa-/);
});
}, 10000);
Copy link
Contributor

Choose a reason for hiding this comment

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

should we extract/name this as like assetTimeout?

Copy link
Member Author

Choose a reason for hiding this comment

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

should we extract/name this as like assetTimeout?

For me, this is one of those instance where I'd prefer to embrace the ugliness to avoid setting a precedent that this is acceptable, and to hopefully motivate some future proper resolution out of a discomfort in how we've chosen to implement this workaround.

@aduth aduth merged commit 9c7c49b into main May 26, 2021
@aduth aduth deleted the aduth-bump-jest-timeout-scss-compile branch May 26, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants