/* * Get single value from key in instance map based on $selector::$key */ @include describe("[function] get-instance-value") { // $flint__instances: ( // ".instance::desktop": ( // "instance-count": 1, // "parent-selector": none, // "key": "desktop", // "breakpoint": 80em, // "columns": 16, // "span": 4, // "context": null, // "gutter": null, // "internal": ( // "width": 18.75em, // "margin-right": 0.625em, // "margin-left": 0.625em // ) // ) // ); @include it("should expect to return false unless inside of a parent instance") { @include should(expect( flint-get-instance-value("desktop", "breakpoint")), to(be(false)) ); } .parent-instance { @include _("desktop", 4); .child-instance { @include _("desktop", 2) { @include it("should expect correct value from parent selector to be fetched from instance map") { @include should(expect( flint-get-instance-value("desktop", "breakpoint")), to(be(80em)) ); @include should(expect( flint-get-instance-value("desktop", "columns")), to(be(16)) ); @include should(expect( flint-get-instance-value("desktop", "span")), to(be(4)) ); @include should(expect( flint-get-instance-value("desktop", "internal", "width")), to(be(18.75em)) ); } @include it("should expect non-existent values to return false") { @include should(expect( flint-get-instance-value("mobile", "breakpoint")), to(be(false)) ); @include should(expect( flint-get-instance-value("laptop", "columns")), to(be(false)) ); } } } } $flint__instances: () !global; $flint__instance-count: 0 !global; }