Skip to content

Commit

Permalink
ut: 补充 mapping 缓存单测
Browse files Browse the repository at this point in the history
  • Loading branch information
edokeh committed Jun 9, 2020
1 parent bcbbf34 commit 6748376
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unit/geom/geom-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ describe('test geoms', function() {
geom.init();
const dataArray1 = geom.get('dataArray');
expect(dataArray1.length).equal(2);


});

it('destroy', function() {
Expand Down Expand Up @@ -299,9 +301,11 @@ describe('test geoms', function() {
geom._beforeMapping([ data ]);
const mappedData = geom._mapping(data);
const obj1 = mappedData[0];
const obj2 = mappedData[1];
expect(obj1.x).equal(50);
expect(obj1.y).eqls([ 100, 200 ]);
expect(obj1.color).equal('red');
expect(obj2.color).equal('red');
});

it('test paint', function() {
Expand Down

0 comments on commit 6748376

Please sign in to comment.