Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
Remove requirement that the primary mixin produces css by default
Browse files Browse the repository at this point in the history
Not all components provide css by default for a particular brand, for example o-fonts' whitelabel mode has no css.
Percy's visual testing catches any regression a component would have if it used to produce css and no longer does
  • Loading branch information
JakeChampion committed Jun 17, 2021
1 parent bccd431 commit 4f8c752
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/tasks/test-sass-compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ async function compilationTest(cwd, { silent, brand } = {
throw new Error('CSS was output by default, without making a call to the component\'s Sass API.');
}

if (!silent && requiresPrimaryMixin && !css) {
throw new Error(`No CSS was output when the primary mixin was included with "@include ${primaryMixinName}();". Does the component have no styles?`);
}

} catch (error) {
const missingPrimaryMixin = error.message.includes(primaryMixinErrorCode);
const missingPrimaryMixinMessage = 'Origami components require a ' +
Expand Down

0 comments on commit 4f8c752

Please sign in to comment.