| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- @use 'true' as test;
- @use '../custom-properties';
- @include test.describe('custom-properties') {
- @include test.describe('get-declaration-value()') {
- @include test.describe('when emit-custom-properties is false ') {
- @include custom-properties.configure($emit-custom-properties: false) {
- @include test.it('returns null when fallback is null') {
- $input: (
- varname: --test-property,
- fallback: null,
- );
- @include test.assert-equal(
- custom-properties.get-declaration-value($input),
- null
- );
- }
- @include test.it('dos not return a custom property') {
- $input: (
- varname: --test-property,
- fallback: 'blue',
- );
- @include test.assert-equal(
- custom-properties.get-declaration-value($input),
- 'blue'
- );
- }
- }
- @include test.it('return a custom property') {
- $input: (
- varname: --test-property,
- fallback: 'blue',
- );
- @include test.assert-equal(
- custom-properties.get-declaration-value($input),
- var(--test-property, 'blue')
- );
- }
- @include test.it(
- 'returns just the custom property when fallback is null'
- ) {
- $input: (
- varname: --test-property,
- fallback: null,
- );
- @include test.assert-equal(
- custom-properties.get-declaration-value($input),
- var(--test-property)
- );
- }
- }
- }
- }
|