@use 'true' as test;
@use '../utilities';

@include test.describe('generate mixin') {
    @include test.it('should generate utility classes based on the provided utility map and infix') {
        $sample-utility: (
            property: display,
            class: d,
            values: (
                block,
                flex,
                grid,
                inline,
                inline-block,
                inline-flex,
                none,
            ),
        );

        @include test.assert() {
            @include test.output() {
                @include utilities.generate($sample-utility, '');
            }

            @include test.expect() {
                // stylelint-disable declaration-no-important -- We need to allow this to make sass-true work
                .d-block {
                    display: block !important;
                }

                .d-flex {
                    display: flex !important;
                }

                .d-grid {
                    display: grid !important;
                }

                .d-inline {
                    display: inline !important;
                }

                .d-inline-block {
                    display: inline-block !important;
                }

                .d-inline-flex {
                    display: inline-flex !important;
                }

                .d-none {
                    display: none !important;
                }
                // stylelint-enable declaration-no-important
            }
        }
    }
}
