Skip to content

Commit

Permalink
use globals
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum committed Sep 20, 2024
2 parents d9f078f + 04941a1 commit 4762bb5
Show file tree
Hide file tree
Showing 161 changed files with 10 additions and 238 deletions.
67 changes: 0 additions & 67 deletions jest.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/data/bucket/fill_bucket.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {test, expect} from 'vitest';

import fs from 'fs';
import path from 'path';
import Protobuf from 'pbf';
Expand Down
1 change: 0 additions & 1 deletion src/data/bucket/line_bucket.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import fs from 'fs';
import path from 'path';
import Protobuf from 'pbf';
Expand Down
1 change: 0 additions & 1 deletion src/data/bucket/symbol_bucket.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import fs from 'fs';
import path from 'path';
import Protobuf from 'pbf';
Expand Down
1 change: 0 additions & 1 deletion src/data/dem_data.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {DEMData} from './dem_data';
import {RGBAImage} from '../util/image';
import {serialize, deserialize} from '../util/web_worker_transfer';
Expand Down
1 change: 0 additions & 1 deletion src/data/feature_position_map.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {FeaturePositionMap} from './feature_position_map';
import {serialize, deserialize} from '../util/web_worker_transfer';

Expand Down
1 change: 0 additions & 1 deletion src/data/load_geometry.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import fs from 'fs';
import path from 'path';
import Protobuf from 'pbf';
Expand Down
1 change: 0 additions & 1 deletion src/geo/edge_insets.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {EdgeInsets} from '../geo/edge_insets';

describe('EdgeInsets', () => {
Expand Down
1 change: 0 additions & 1 deletion src/geo/lng_lat.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {LngLat} from '../geo/lng_lat';

describe('LngLat', () => {
Expand Down
1 change: 0 additions & 1 deletion src/geo/lng_lat_bounds.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {LngLat} from './lng_lat';
import {LngLatBounds} from './lng_lat_bounds';

Expand Down
1 change: 0 additions & 1 deletion src/geo/mercator_coordinate.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {LngLat} from './lng_lat';
import {MercatorCoordinate, mercatorScale} from './mercator_coordinate';

Expand Down
1 change: 0 additions & 1 deletion src/geo/transform.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import Point from '@mapbox/point-geometry';
import {MAX_VALID_LATITUDE, Transform} from './transform';
import {LngLat} from './lng_lat';
Expand Down
1 change: 0 additions & 1 deletion src/gl/render_pool.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {Context} from './context';
import {RenderPool} from './render_pool';

Expand Down
1 change: 0 additions & 1 deletion src/gl/state.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {IValue, ClearColor, ClearDepth, ClearStencil, ColorMask, DepthMask, StencilMask, StencilFunc, StencilOp, StencilTest, DepthRange, DepthTest, DepthFunc, Blend, BlendFunc, BlendColor, ProgramValue, ActiveTextureUnit, Viewport, BindFramebuffer, BindRenderbuffer, BindTexture, BindVertexBuffer, BindElementBuffer, BindVertexArray, PixelStoreUnpack, PixelStoreUnpackPremultiplyAlpha} from './value';
import {Context} from './context';
import {Color} from '@maplibre/maplibre-gl-style-spec';
Expand Down
1 change: 0 additions & 1 deletion src/gl/vertex_buffer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, test, expect, vi} from 'vitest';
import {VertexBuffer} from './vertex_buffer';
import {StructArrayLayout3i6} from '../data/array_types.g';
import {Context} from '../gl/context';
Expand Down
1 change: 0 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterAll, test, expect} from 'vitest';
import {config} from './util/config';
import {addProtocol, getWorkerCount, removeProtocol, getVersion} from './index';
import {getJSON, getArrayBuffer} from './util/ajax';
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_custom.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi, Mock} from 'vitest';
import {mat4} from 'gl-matrix';
import {OverscaledTileID} from '../source/tile_id';
import {SourceCache} from '../source/source_cache';
Expand All @@ -8,6 +7,7 @@ import type {Map} from '../ui/map';
import {Transform} from '../geo/transform';
import {drawCustom} from './draw_custom';
import {CustomStyleLayer} from '../style/style_layer/custom_style_layer';
import type {Mock} from 'vitest';

vi.mock('./painter');
vi.mock('./program');
Expand Down
1 change: 0 additions & 1 deletion src/render/draw_debug.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {SourceCache} from '../source/source_cache';
import {RasterSourceSpecification, SourceSpecification, VectorSourceSpecification} from '@maplibre/maplibre-gl-style-spec';
import {Style} from '../style/style';
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_fill.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi, Mock} from 'vitest';
import {mat4} from 'gl-matrix';
import {OverscaledTileID} from '../source/tile_id';
import {SourceCache} from '../source/source_cache';
Expand All @@ -15,6 +14,7 @@ import {FillStyleLayer} from '../style/style_layer/fill_style_layer';
import {drawFill} from './draw_fill';
import {FillBucket} from '../data/bucket/fill_bucket';
import {ProgramConfiguration, ProgramConfigurationSet} from '../data/program_configuration';
import type {Mock} from 'vitest';

vi.mock('./painter');
vi.mock('./program');
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_symbol.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi, Mock} from 'vitest';
import {mat4} from 'gl-matrix';
import {OverscaledTileID} from '../source/tile_id';
import {SymbolBucket} from '../data/bucket/symbol_bucket';
Expand All @@ -15,6 +14,7 @@ import {Transform} from '../geo/transform';
import type {EvaluationParameters} from '../style/evaluation_parameters';
import type {SymbolLayerSpecification} from '@maplibre/maplibre-gl-style-spec';
import {Style} from '../style/style';
import type {Mock} from 'vitest';

vi.mock('./painter');
vi.mock('./program');
Expand Down
1 change: 0 additions & 1 deletion src/render/glyph_manager.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, afterEach, test, expect, vi} from 'vitest';
import {parseGlyphPbf} from '../style/parse_glyph_pbf';
import {GlyphManager} from './glyph_manager';
import fs from 'fs';
Expand Down
1 change: 0 additions & 1 deletion src/render/line_atlas.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {LineAtlas} from './line_atlas';

describe('LineAtlas', () => {
Expand Down
1 change: 0 additions & 1 deletion src/render/painter.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {test} from 'vitest';
import {TerrainSpecification} from '@maplibre/maplibre-gl-style-spec';

import {Painter} from './painter';
Expand Down
1 change: 0 additions & 1 deletion src/render/render_to_texture.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {RenderToTexture} from './render_to_texture';
import type {Painter} from './painter';
import type {LineStyleLayer} from '../style/style_layer/line_style_layer';
Expand Down
1 change: 0 additions & 1 deletion src/render/terrain.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi} from 'vitest';
import Point from '@mapbox/point-geometry';
import {Terrain} from './terrain';
import {Context} from '../gl/context';
Expand Down
1 change: 0 additions & 1 deletion src/render/uniform_binding.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {mat4} from 'gl-matrix';
import {Context} from '../gl/context';
import {
Expand Down
1 change: 0 additions & 1 deletion src/render/update_pattern_positions_in_program.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {Tile} from '../source/tile';
import {OverscaledTileID} from '../source/tile_id';
import {updatePatternPositionsInProgram} from './update_pattern_positions_in_program';
Expand Down
1 change: 0 additions & 1 deletion src/shaders/encode_attribute.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {test, expect} from 'vitest';
import {packUint8ToFloat} from './encode_attribute';

test('packUint8ToFloat', () => {
Expand Down
1 change: 0 additions & 1 deletion src/source/canvas_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, test, expect, vi} from 'vitest';
import {CanvasSource} from '../source/canvas_source';
import {Transform} from '../geo/transform';
import {Event, Evented} from '../util/evented';
Expand Down
1 change: 0 additions & 1 deletion src/source/geojson_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {Tile} from './tile';
import {OverscaledTileID} from './tile_id';
import {GeoJSONSource, GeoJSONSourceOptions} from './geojson_source';
Expand Down
1 change: 0 additions & 1 deletion src/source/geojson_source_diff.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, test, expect} from 'vitest';
import {setPerformance} from '../util/test/util';
import {type GeoJSONFeatureId, isUpdateableGeoJSON, toUpdateable, applySourceDiff} from './geojson_source_diff';

Expand Down
1 change: 0 additions & 1 deletion src/source/geojson_worker_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi} from 'vitest';
import {GeoJSONWorkerSource, LoadGeoJSONParameters} from './geojson_worker_source';
import {StyleLayerIndex} from '../style/style_layer_index';
import {OverscaledTileID} from './tile_id';
Expand Down
1 change: 0 additions & 1 deletion src/source/geojson_wrapper.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {GeoJSONWrapper} from './geojson_wrapper';

describe('geojsonwrapper', () => {
Expand Down
1 change: 0 additions & 1 deletion src/source/image_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, test, expect, vi} from 'vitest';
import {ImageSource} from './image_source';
import {Evented} from '../util/evented';
import {Transform} from '../geo/transform';
Expand Down
1 change: 0 additions & 1 deletion src/source/query_features.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {
queryRenderedFeatures,
querySourceFeatures
Expand Down
1 change: 0 additions & 1 deletion src/source/raster_dem_tile_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi, it} from 'vitest';
import {fakeServer, FakeServer} from 'nise';
import {RasterDEMTileSource} from './raster_dem_tile_source';
import {OverscaledTileID} from './tile_id';
Expand Down
1 change: 0 additions & 1 deletion src/source/raster_dem_tile_worker_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {RasterDEMTileWorkerSource} from './raster_dem_tile_worker_source';
import {DEMData} from '../data/dem_data';
import {WorkerDEMTileParameters} from './worker_source';
Expand Down
1 change: 0 additions & 1 deletion src/source/raster_tile_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi, it} from 'vitest';
import {RasterTileSource} from './raster_tile_source';
import {OverscaledTileID} from './tile_id';
import {RequestManager} from '../util/request_manager';
Expand Down
1 change: 0 additions & 1 deletion src/source/rtl_text_plugin_main_thread.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, it, afterEach, expect, vi} from 'vitest';
import {FakeServer, fakeServer} from 'nise';
import {rtlMainThreadPluginFactory} from './rtl_text_plugin_main_thread';
import {sleep} from '../util/test/util';
Expand Down
1 change: 0 additions & 1 deletion src/source/source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {Dispatcher} from '../util/dispatcher';
import {SourceClass, addSourceType, create} from './source';

Expand Down
1 change: 0 additions & 1 deletion src/source/source_cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, afterEach, test, expect, vi} from 'vitest';
import {SourceCache} from './source_cache';
import {Map} from '../ui/map';
import {Source, addSourceType} from './source';
Expand Down
1 change: 0 additions & 1 deletion src/source/terrain_source_cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeAll, afterAll, test, expect} from 'vitest';
import {TerrainSourceCache} from './terrain_source_cache';
import {Style} from '../style/style';
import {RequestManager} from '../util/request_manager';
Expand Down
1 change: 0 additions & 1 deletion src/source/tile.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {createSymbolBucket} from '../../test/unit/lib/create_symbol_layer';
import {Tile} from '../source/tile';
import {GeoJSONWrapper, Feature} from '../source/geojson_wrapper';
Expand Down
1 change: 0 additions & 1 deletion src/source/tile_cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {Tile} from './tile';
import {TileCache} from './tile_cache';
import {OverscaledTileID} from './tile_id';
Expand Down
1 change: 0 additions & 1 deletion src/source/tile_id.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {CanonicalTileID, OverscaledTileID} from '../source/tile_id';
import {MAX_TILE_ZOOM, MIN_TILE_ZOOM} from '../util/util';

Expand Down
1 change: 0 additions & 1 deletion src/source/vector_tile_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi} from 'vitest';
import {fakeServer, type FakeServer} from 'nise';
import {Source} from './source';
import {VectorTileSource} from './vector_tile_source';
Expand Down
1 change: 0 additions & 1 deletion src/source/vector_tile_worker_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi} from 'vitest';
import fs from 'fs';
import path from 'path';
import vt from '@mapbox/vector-tile';
Expand Down
1 change: 0 additions & 1 deletion src/source/video_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {VideoSource} from './video_source';
import {extend} from '../util/util';
import {getMockDispatcher} from '../util/test/util';
Expand Down
1 change: 0 additions & 1 deletion src/source/worker.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, test, expect, vi} from 'vitest';
import {fakeServer} from 'nise';
import Worker from './worker';
import {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';
Expand Down
1 change: 0 additions & 1 deletion src/source/worker_tile.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {WorkerTile} from '../source/worker_tile';
import {GeoJSONWrapper, Feature} from '../source/geojson_wrapper';
import {OverscaledTileID} from '../source/tile_id';
Expand Down
1 change: 0 additions & 1 deletion src/style/format_section_override.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {EvaluationContext, FormattedSection, createExpression, StyleExpression, ZoomConstantExpression} from '@maplibre/maplibre-gl-style-spec';
import properties from './style_layer/symbol_style_layer_properties.g';
import {PossiblyEvaluatedPropertyValue} from './properties';
Expand Down
1 change: 0 additions & 1 deletion src/style/light.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect, vi} from 'vitest';
import {Light} from './light';
import {Color, latest as styleSpec, LightSpecification} from '@maplibre/maplibre-gl-style-spec';
import {sphericalToCartesian} from '../util/util';
Expand Down
1 change: 0 additions & 1 deletion src/style/load_glyph_range.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {test, expect, vi} from 'vitest';
import fs from 'fs';
import path from 'path';
import {RequestManager} from '../util/request_manager';
Expand Down
1 change: 0 additions & 1 deletion src/style/load_sprite.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, test, expect, vi} from 'vitest';
import fs from 'fs';
import path from 'path';
import {RequestManager} from '../util/request_manager';
Expand Down
1 change: 0 additions & 1 deletion src/style/query_utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import Point from '@mapbox/point-geometry';

import {offsetLine} from './query_utils';
Expand Down
1 change: 0 additions & 1 deletion src/style/style.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, beforeEach, afterEach, test, expect, vi} from 'vitest';
import {Style} from './style';
import {SourceCache} from '../source/source_cache';
import {StyleLayer} from './style_layer';
Expand Down
1 change: 0 additions & 1 deletion src/style/style_layer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {createStyleLayer} from './create_style_layer';
import {FillStyleLayer} from './style_layer/fill_style_layer';
import {extend} from '../util/util';
Expand Down
1 change: 0 additions & 1 deletion src/style/style_layer/fill_style_layer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {getIntersectionDistance, Point3D} from './fill_extrusion_style_layer';

describe('getIntersectionDistance', () => {
Expand Down
1 change: 0 additions & 1 deletion src/style/style_layer/line_style_layer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {createStyleLayer} from '../create_style_layer';
import {extend} from '../../util/util';
import {LineStyleLayer} from './line_style_layer';
Expand Down
1 change: 0 additions & 1 deletion src/style/style_layer/overlap_mode.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {getOverlapMode} from './overlap_mode';
import {SymbolStyleLayer} from './symbol_style_layer';
import {ZoomHistory} from '../zoom_history';
Expand Down
1 change: 0 additions & 1 deletion src/style/style_layer/variable_text_anchor.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {EvaluationParameters} from '../evaluation_parameters';
import {ZoomHistory} from '../zoom_history';
import {SymbolStyleLayer} from './symbol_style_layer';
Expand Down
1 change: 0 additions & 1 deletion src/style/style_layer_index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, test, expect} from 'vitest';
import {mapObject} from '../util/util';
import {StyleLayerIndex} from './style_layer_index';

Expand Down
Loading

0 comments on commit 4762bb5

Please sign in to comment.