aboutsummaryrefslogtreecommitdiff
path: root/tests/style-reader.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-03-29 23:04:44 +0000
committerMichael Williamson <mike@zwobble.org>2013-03-29 23:04:44 +0000
commit354a6ba8f34108236879c8af4280abea74409be5 (patch)
tree03d9c404a3609a450068d9d78a7d875b90af3a54 /tests/style-reader.tests.js
parente51abdc358cef3655f074f4ab0e6000623ce4749 (diff)
Allow reading of multiple classes on style
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);
+ });
})