finished migrating all shape unit tests over to mocha. continued working on context tracing support

This commit is contained in:
Eric Rowell
2013-09-07 17:57:48 -07:00
parent eddcf8ccbe
commit ee5f4c3e3b
17 changed files with 150 additions and 324 deletions

View File

@@ -0,0 +1,39 @@
suite('Polygon', function() {
test('add polygon', function() {
var stage = buildStage();
var layer = new Kinetic.Layer();
var points = [{
x: 73,
y: 192
}, {
x: 73,
y: 160
}, {
x: 340,
y: 23
}, {
x: 500,
y: 109
}, {
x: 499,
y: 139
}, {
x: 342,
y: 93
}];
var poly = new Kinetic.Polygon({
points: points,
fill: 'green',
stroke: 'blue',
strokeWidth: 5
});
layer.add(poly);
stage.add(layer);
assert.equal(poly.getClassName(), 'Polygon');
});
});