describe('without a source', function() {
- point(function() {
- matrix = new SVG.Point
+ beforeEach(function() {
+ point = new SVG.Point
})
it('creates a new point with default values', function() {
describe('morph()', function() {
it('stores a given point for morphing', function() {
var point1 = new SVG.Point(1,1)
- , point2 = new SVG.Matrix(2,2)
+ , point2 = new SVG.Point(2,2)
point1.morph(point2)
})
it('stores a clone, not the given matrix itself', function() {
var point1 = new SVG.Point(1,1)
- , point2 = new SVG.Matrix(2,2)
+ , point2 = new SVG.Point(2,2)
point1.morph(point2)
it('returns a morphed point at a given position', function() {
var point1 = new SVG.Point(1,1)
, point2 = new SVG.Point(2,2)
- , matrix3 = matrix1.morph(matrix2).at(0.5)
+ , point3 = point1.morph(point2).at(0.5)
- expect(matrix3).toEqual(new SVG.Point(1.5, 1.5))
+ expect(point3).toEqual(new SVG.Point(1.5, 1.5))
})
})
var point = new SVG.Point(1,5)
, matrix = new SVG.Matrix(0,0,1,0,0,1)
- expect(point.transform(matrox)).toEqual(new SVG.Point(5,1))
+ expect(point.transform(matrix)).toEqual(new SVG.Point(5,1))
})
- }
+ })
describe('native()', function() {
it('returns native SVGPoint', function() {