aboutsummaryrefslogtreecommitdiff
path: root/tests/style-reader.tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/style-reader.tests.js')
-rw-r--r--tests/style-reader.tests.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/style-reader.tests.js b/tests/style-reader.tests.js
index 18aa263..10047dc 100644
--- a/tests/style-reader.tests.js
+++ b/tests/style-reader.tests.js
@@ -12,4 +12,18 @@ describe('styleReader.read', function() {
test('reads nested elements', function() {
assert.deepEqual(styleReader.read("ul li"), styles.elements(["ul", "li"]));
});
+
+ test('reads class on element', function() {
+ var expected = styles.elements([
+ styles.element("p", {"class": "tip"})
+ ])
+ assert.deepEqual(styleReader.read("p.tip"), expected);
+ });
+
+ test('reads multiple classes on element', function() {
+ var expected = styles.elements([
+ styles.element("p", {"class": "tip help"})
+ ])
+ assert.deepEqual(styleReader.read("p.tip.help"), expected);
+ });
})