@@ -14,9 +14,6 @@ import Transform from '../geo/transform';
1414import type EvaluationParameters from '../style/evaluation_parameters' ;
1515import type { SymbolLayerSpecification } from '../style-spec/types.g' ;
1616import Style from '../style/style' ;
17- import TerrainSourceCache from '../source/terrain_source_cache' ;
18- import { Evented } from '../util/evented' ;
19- import { RequestManager } from '../util/request_manager' ;
2017
2118jest . mock ( './painter' ) ;
2219jest . mock ( './program' ) ;
@@ -25,22 +22,6 @@ jest.mock('../source/tile');
2522jest . mock ( '../data/bucket/symbol_bucket' ) ;
2623jest . mock ( '../symbol/projection' ) ;
2724
28- class StubMap extends Evented {
29- transform : Transform ;
30- painter : Painter ;
31- _requestManager : RequestManager ;
32-
33- constructor ( ) {
34- super ( ) ;
35- this . transform = new Transform ( ) ;
36- this . _requestManager = {
37- transformRequest : ( url ) => {
38- return { url} ;
39- }
40- } as any as RequestManager ;
41- }
42- }
43-
4425describe ( 'drawSymbol' , ( ) => {
4526 test ( 'should not do anything' , ( ) => {
4627 const mockPainter = new Painter ( null , null ) ;
@@ -63,7 +44,7 @@ describe('drawSymbol', () => {
6344 painterMock . renderPass = 'translucent' ;
6445 painterMock . transform = { pitch : 0 , labelPlaneMatrix : mat4 . create ( ) } as any as Transform ;
6546 painterMock . options = { } as any ;
66- painterMock . style = { terrainSourceCache : { getTerrain : ( ) => null } } as any as Style ;
47+ painterMock . style = { } as any as Style ;
6748
6849 const layerSpec = {
6950 id : 'mock-layer' ,
@@ -164,9 +145,7 @@ describe('drawSymbol', () => {
164145 const sourceCacheMock = new SourceCache ( null , null , null ) ;
165146 ( sourceCacheMock . getTile as jest . Mock ) . mockReturnValue ( tile ) ;
166147 sourceCacheMock . map = { showCollisionBoxes : false } as any as Map ;
167- painterMock . style = {
168- terrainSourceCache : new TerrainSourceCache ( new Style ( new StubMap ( ) as any as Map ) )
169- } as any as Style ;
148+ painterMock . style = { } as any as Style ;
170149
171150 const spy = jest . spyOn ( symbolProjection , 'updateLineLabels' ) ;
172151 drawSymbol ( painterMock , sourceCacheMock , layer , [ tileId ] , null ) ;
0 commit comments