Sha256: 616da162cd34bce8eb6c76643839ec6d3d19f65feba2fdeb78386295c6503a5b

Contents?: true

Size: 669 Bytes

Versions: 3

Compression:

Stored size: 669 Bytes

Contents

/*
 * Fetch value from map
 */
@include describe("[function] map-fetch") {

	$map: (
		"key": "value",
		"deep-map": (
			"deep-key": "deep-value"
		)
	);

	@include it("should expect values to be fetched from map") {
		@include should(expect(
			flint-map-fetch($map, "key")),
			to(be("value"))
		);
		@include should(expect(
			flint-map-fetch($map, "deep-map", "deep-key")),
			to(be("deep-value"))
		);
	}

	@include it("should expect non-existent values to return false") {
		@include should(expect(
			flint-map-fetch($map, "unknown")),
			to(be(false))
		);
		@include should(expect(
			flint-map-fetch($map, "deep-map", "unknown")),
			to(be(false))
		);
	}
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
flint-gs-2.0.6 tests/input/functions/lib/_map-fetch.scss
flint-gs-2.0.5 tests/input/functions/lib/_map-fetch.scss
flint-gs-2.0.4 tests/input/functions/lib/_map-fetch.scss