Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Berry <bryan@olenepal.org>2009-11-20 19:10:44 (GMT)
committer Bryan Berry <bryan@olenepal.org>2009-11-20 19:10:44 (GMT)
commit73da61b89ec7ca6a424000993648d391d1a8b1cb (patch)
treeee3ae310d5be950078773fbb14e854d9a20b85e0
parent9cbc55285e44064c06f119bef39c20145ed1f0ff (diff)
tests for makeChain added. All tests pass for the moment.
-rwxr-xr-xtests/js/tests.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/js/tests.js b/tests/js/tests.js
index a432498..4aee58e 100755
--- a/tests/js/tests.js
+++ b/tests/js/tests.js
@@ -779,7 +779,8 @@
+ " specified in the html");
});
-
+
+
asyncTest("Karma.makeSvgs good svg loads",
function(){
expect(4);
@@ -870,12 +871,23 @@
test("k.canvases['testCanvas'].strokeStyle('#ffffff') "
+ "sets strokeStyle correctly",
function(){
- expect(1);
+ expect(3);
var canvases = [{name: "myCanvas", domId:"testCanvas"}];
Karma.makeCanvases(canvases);
k.canvases['myCanvas'].strokeStyle('#ffffff');
ok( k.canvases['myCanvas'].ctx.strokeStyle ===
'#ffffff', 'Stroke style properly set');
+ ok(shouldError(
+ function(){
+ k.canvases['myCanvas'].ctx.strokeStyle('#ffffff');
+
+ }),"ctx.strokeStyle is a property and not a function");
+
+ ok(shouldNotError(
+ function(){
+ k.canvases['myCanvas'].strokeStyle('#ffffff')
+ .clear().save().restore().clearRect(0, 0, 20, 20);
+ }),"Chaining works!");
});