Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 82b197a

Browse files
author
Narciso Jaramillo
committed
Made unit test for getRangeSelectors() slightly more realistic
1 parent 3c934b0 commit 82b197a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/spec/CSSUtils-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,15 +1656,15 @@ define(function (require, exports, module) {
16561656
});
16571657

16581658
it("should extract selectors at the beginning of a text range", function () {
1659-
var doc = SpecRunnerUtils.createMockDocument(".foo {}\n.bar, #baz {}\nh2 {}\n"),
1660-
range = new TextRange(doc, 1, 1);
1659+
var doc = SpecRunnerUtils.createMockDocument(".foo {}\n.bar, #baz {\n color: #fff;\n}\nh2 {}\n"),
1660+
range = new TextRange(doc, 1, 3);
16611661
expect(CSSUtils.getRangeSelectors(range)).toBe(".bar, #baz");
16621662
range.dispose();
16631663
});
16641664

16651665
it("should extract selectors spanning multiple lines at the beginning of a text range, with newlines replaced", function () {
1666-
var doc = SpecRunnerUtils.createMockDocument(".foo {}\n.bar,\n#baz {}\nh2 {}\n"),
1667-
range = new TextRange(doc, 1, 2);
1666+
var doc = SpecRunnerUtils.createMockDocument(".foo {}\n.bar,\n#baz {\n color: #fff;\n}\nh2 {}\n"),
1667+
range = new TextRange(doc, 1, 3);
16681668
expect(CSSUtils.getRangeSelectors(range)).toBe(".bar, #baz");
16691669
range.dispose();
16701670
});

0 commit comments

Comments
 (0)