[Pkg-javascript-commits] [node-cssstyle] 20/39: added tests for shorthand implicit properties
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Sep 20 20:22:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository node-cssstyle.
commit 7aa6d8e9549243a0a0ed88e84957cc5e893bac0a
Author: Chad Walker <chad at chad-cat-lore-eddie.com>
Date: Sun Jun 9 22:14:03 2013 -0500
added tests for shorthand implicit properties
---
tests/tests.js | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/tests/tests.js b/tests/tests.js
index d297d8d..c74d61b 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -72,5 +72,21 @@ module.exports = {
style.removeProperty('color');
test.ok('background-color' === style[0], 'style[0] is not background-color');
test.done();
+ },
+ 'Test Shorthand and Implicit Properties': function (test) {
+ var style = new cssstyle.CSSStyleDeclaration();
+ test.expect(9);
+ style.background = 'blue url(http://www.example.com/some_img.jpg)';
+ test.ok('blue' === style.backgroundColor, 'backgroundColor is not blue');
+ test.ok('url(http://www.example.com/some_img.jpg)' === style.backgroundImage, 'backgroundImage is wrong');
+ test.ok('blue url(http://www.example.com/some_img.jpg)' === style.background, 'background is different');
+ style.border = '1px solid black';
+ test.ok('1px', style.borderWidth, 'borderWidth is not 1px');
+ test.ok('solid', style.borderStyle, 'borderStyle is not solid');
+ test.ok('black', style.borderColor, 'borderColor is not black');
+ test.ok('1px', style.borderTopWidth, 'borderTopWidth is not 1px');
+ test.ok('solid', style.borderLeftStyle, 'borderLeftStyle is not solid');
+ test.ok('black', style.borderBottomColor, 'borderBottomColor is not black');
+ test.done();
}
-};
\ No newline at end of file
+};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-cssstyle.git
More information about the Pkg-javascript-commits
mailing list