Sha256: 5a520e28163a7088b50810630ce92508a21871962acaffacbd6a7479cfbd1644

Contents?: true

Size: 1.42 KB

Versions: 15

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

15 entries across 15 versions & 1 rubygems

Version Path
flint-gs-2.3.6 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.3.5 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.3.4 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.3.3 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.3.2 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.3.1 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.3.0 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.2.0 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.1.4 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.1.3 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.1.2 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.1.1 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.1.0 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.0.9 tests/input/functions/lib/_types-in-list.scss
flint-gs-2.0.8 tests/input/functions/lib/_types-in-list.scss