We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af005f1 + 894a6fa commit a8d8670Copy full SHA for a8d8670
packages/govuk-frontend/src/govuk/all.unit.test.mjs
@@ -94,9 +94,12 @@ describe('GOV.UK Frontend', () => {
94
it('does not contain any unexpected govuk- function calls', async () => {
95
const sass = '@import "index"'
96
97
- await expect(compileSassString(sass)).resolves.toMatchObject({
98
- css: expect.not.stringMatching(/_?govuk-[\w-]+\(.*?\)/g)
99
- })
+ const { css } = await compileSassString(sass)
+ const matches = css.matchAll(/_?govuk-[\w-]+\(.*?\)/g)
+
100
+ // `matchAll` does not return an actual `Array` so we need
101
+ // a little conversion before we can check its length
102
+ expect(Array.from(matches)).toHaveLength(0)
103
})
104
105
describe('Sass documentation', () => {
0 commit comments