Skip to content

Add integration tests simulating libaries including GOV.UK Frontend#7095

Open
romaricpascal wants to merge 3 commits into
mainfrom
libraries-integration-tests
Open

Add integration tests simulating libaries including GOV.UK Frontend#7095
romaricpascal wants to merge 3 commits into
mainfrom
libraries-integration-tests

Conversation

@romaricpascal

@romaricpascal romaricpascal commented May 26, 2026

Copy link
Copy Markdown
Member

Add tests checking that configuration gets applied properly when libraries include GOV.UK Frontend:

  • that with @import both GOV.UK Frontend and the library get appropriately configured by global variables
  • that with @use the library gets appropriately affected by configuration of pkg:govuk-frontend
  • that with @forward configuring the library appropriately configures both GOV.UK Frontend and a subsequent library that @uses GOV.UK Frontend

As we're recommending to either only @use or @import all your stylesheets, this PR does not add any tests about mixing @use and @import (we already know this may lead to duplicate output or GOV.UK Frontend getting loaded again with a blank configuration due to how Sass loads files).

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

📋 Stats

No changes to any distributed file sizes!


Action run for f4c096f

We need to explicitely import `index.import` because Sass does not load the import only file if using `pkg:` URLs: https://github.com/sass/dart-sass/issues/2771
Adds the library, but tests still need adding
…tend

Verify that when configuring the library, the configuration also gets applied to a subsequent library that `@use`s GOV.UK Frontend.
@romaricpascal romaricpascal force-pushed the libraries-integration-tests branch from 821a565 to f4c096f Compare May 26, 2026 13:52
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-7095 May 26, 2026 13:52 Inactive
@@ -0,0 +1,6 @@
@import "pkg:govuk-frontend/index.import";

@NickColley NickColley May 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we spoke about it before sorry but should we also have a case for
@import "pkg:govuk-frontend"; ?

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.

3 participants