<commit_before>@import '../base/utilities/functions';

@include describe('Unit conversions') {
    @include it('should convert pixels to rem') {
        @include assert-equal(rem(16px, 16px), 1rem);
    }

    @include it('should convert pixels to em') {
        @include assert-equal(em(16px, 16px), 1em);
    }

    @include it('should convert relative units to pixels') {
        @include assert-equal(px(1em, 16px), 16px);
        @include assert-equal(px(1rem, 16px), 16px);
    }
}
<commit_msg>test(themes): add more tests<commit_after>@import '../base/utilities/functions';

@include describe('Unit conversions') {
    @include it('should convert pixel numbers to rem') {
        @include assert-equal(rem(16px, 16px), 1rem);
    }

    @include it('should convert unitless numbers to rem') {
        @include assert-equal(rem(16, 16), 1rem);
    }

    @include it('should convert pixel numbers to em') {
        @include assert-equal(em(16px, 16px), 1em);
    }

    @include it('should convert unitless numbers to em') {
        @include assert-equal(em(16px, 16px), 1em);
    }

    @include it('should convert relative unit numbers to pixels') {
        @include assert-equal(px(1em, 16px), 16px);
        @include assert-equal(px(1rem, 16px), 16px);
    }

    @include it('should convert unitless numbers to pixels') {
        @include assert-equal(px(1, 16), 16px);
    }
}

@include describe('Luminance') {
    @include it('should return a number') {
        @include assert-true(type-of(luminance(blue)), 'number');
    }

    @include it('should retrieve luminance for a given color value') {
        @include assert-equal(luminance(red), .2126);
    }

    @include it('should pass through non-color values') {
        @include assert-equal(luminance('bozo'), 'bozo');
    }
}

@include describe('Contrast') {
    @include it('should return a number') {
        @include assert-true(type-of(contrast(white, black)), 'number');
    }

    @include it('should return the contrast ratio between two colors') {
        @include assert-equal(contrast(white, black), 21);
        @include assert-equal(round(contrast(#09f, black)), 7);
    }
}

{'fraction_non_alphanumeric': 0.1492814093648586, 'fraction_numerical': 0.0296708391284191, 'mean_word_length': 3.248031496062992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1794311', 'n_tokens_mistral': 722, 'n_tokens_neox': 653, 'n_words': 178}