Sha256: 8bb349ec9a84180c67cc5dc93fabd40b8674b2c14e8fe8ea854bbd7faa47384b

Contents?: true

Size: 1.42 KB

Versions: 3

Compression:

Stored size: 1.42 KB

Contents

/*
 * Checks type of each item in list
 */
@include describe("[function] types-in-list") {

    $list-of-numbers: 1, 2, 3, 4, 5;
    $list-of-strings: "one", "two", "three";
    $mixed-list: 1, "two", 3, "four";
    $string: "string";

    @include it("should expect to return false if list is not passed") {
        @include should(expect(
            flint-types-in-list($string)),
            to(be(false))
        );
    }

    @include it("should expect types to be asserted in list") {
        @include should(expect(
            flint-types-in-list($list-of-numbers)),
            to(be(true))
        );
        @include should(expect(
            flint-types-in-list($list-of-numbers, "number")),
            to(be((true)))
        );
        @include should(expect(
            flint-types-in-list($list-of-strings, "string", 3)),
            to(be((true)))
        );
        @include should(expect(
            flint-types-in-list($mixed-list, "number" "string" "number" "string", 4)),
            to(be((true)))
        );
    }

    @include it("should expect auto asserted types to return false") {
        @include should(expect(
            flint-types-in-list($mixed-list)),
            to(be((false)))
        );
    }

    @include it("should expect asserted length to return false") {
        @include should(expect(
            flint-types-in-list($list-of-strings, "string", 1)),
            to(be((false)))
        );
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
flint-gs-2.0.6 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.0.5 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.0.4 tests/input/functions/lib/_types-in-list.scss