forked from MapComplete/MapComplete
		
	Fix tests
This commit is contained in:
		
							parent
							
								
									0e760b908c
								
							
						
					
					
						commit
						16816a916c
					
				
					 28 changed files with 124 additions and 117 deletions
				
			
		|  | @ -40,7 +40,7 @@ | ||||||
|     "generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -", |     "generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -", | ||||||
|     "prepare-deploy": "npm run generate:service-worker && ./scripts/build.sh", |     "prepare-deploy": "npm run generate:service-worker && ./scripts/build.sh", | ||||||
|     "format": "prettier --write '**/*.ts' '**/*.svelte'", |     "format": "prettier --write '**/*.ts' '**/*.svelte'", | ||||||
|     "clean:tests": "(find . -type f -name \"*.doctest.ts\" | xargs -r rm)", |     "clean:tests": "find . -type f -name \"*.doctest.ts\" | xargs -r rm", | ||||||
|     "clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|studio\\|theme\\|style_test\\|statistics\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm) && (ls | grep \".*.webmanifest$\" | grep -v \"manifest.webmanifest\" | xargs -r rm)", |     "clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|studio\\|theme\\|style_test\\|statistics\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm) && (ls | grep \".*.webmanifest$\" | grep -v \"manifest.webmanifest\" | xargs -r rm)", | ||||||
|     "generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot", |     "generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot", | ||||||
|     "weblate-add-upstream": "git remote add weblate-github git@github.com:weblate/MapComplete.git && git remote add weblate-hosted-core https://hosted.weblate.org/git/mapcomplete/core/ && git remote add weblate-hosted-layers https://hosted.weblate.org/git/mapcomplete/layers/", |     "weblate-add-upstream": "git remote add weblate-github git@github.com:weblate/MapComplete.git && git remote add weblate-hosted-core https://hosted.weblate.org/git/mapcomplete/core/ && git remote add weblate-hosted-layers https://hosted.weblate.org/git/mapcomplete/layers/", | ||||||
|  |  | ||||||
|  | @ -1,30 +1,30 @@ | ||||||
| /** | /** | ||||||
|  * Generates a collection of geojson files based on an overpass query for a given theme |  * Generates a collection of geojson files based on an overpass query for a given theme | ||||||
|  */ |  */ | ||||||
| import { Utils } from "../Utils" | import { Utils } from "../src/Utils" | ||||||
| import { Overpass } from "../Logic/Osm/Overpass" | import { Overpass } from "../src/Logic/Osm/Overpass" | ||||||
| import { existsSync, readFileSync, writeFileSync } from "fs" | import { existsSync, readFileSync, writeFileSync } from "fs" | ||||||
| import { TagsFilter } from "../Logic/Tags/TagsFilter" | import { TagsFilter } from "../src/Logic/Tags/TagsFilter" | ||||||
| import { Or } from "../Logic/Tags/Or" | import { Or } from "../src/Logic/Tags/Or" | ||||||
| import { AllKnownLayouts } from "../Customizations/AllKnownLayouts" | import { AllKnownLayouts } from "../src/Customizations/AllKnownLayouts" | ||||||
| import * as OsmToGeoJson from "osmtogeojson" | import * as OsmToGeoJson from "osmtogeojson" | ||||||
| import MetaTagging from "../Logic/MetaTagging" | import MetaTagging from "../src/Logic/MetaTagging" | ||||||
| import { UIEventSource } from "../Logic/UIEventSource" | import { UIEventSource } from "../src/Logic/UIEventSource" | ||||||
| import { TileRange, Tiles } from "../Models/TileRange" | import { TileRange, Tiles } from "../src/Models/TileRange" | ||||||
| import LayoutConfig from "../Models/ThemeConfig/LayoutConfig" | import LayoutConfig from "../src/Models/ThemeConfig/LayoutConfig" | ||||||
| import ScriptUtils from "./ScriptUtils" | import ScriptUtils from "./ScriptUtils" | ||||||
| import PerLayerFeatureSourceSplitter from "../Logic/FeatureSource/PerLayerFeatureSourceSplitter" | import PerLayerFeatureSourceSplitter from "../src/Logic/FeatureSource/PerLayerFeatureSourceSplitter" | ||||||
| import FilteredLayer from "../Models/FilteredLayer" | import FilteredLayer from "../src/Models/FilteredLayer" | ||||||
| import StaticFeatureSource from "../Logic/FeatureSource/Sources/StaticFeatureSource" | import StaticFeatureSource from "../src/Logic/FeatureSource/Sources/StaticFeatureSource" | ||||||
| import Constants from "../Models/Constants" | import Constants from "../src/Models/Constants" | ||||||
| import { GeoOperations } from "../Logic/GeoOperations" | import { GeoOperations } from "../src/Logic/GeoOperations" | ||||||
| import SimpleMetaTaggers, { ReferencingWaysMetaTagger } from "../Logic/SimpleMetaTagger" | import SimpleMetaTaggers, { ReferencingWaysMetaTagger } from "../src/Logic/SimpleMetaTagger" | ||||||
| import FilteringFeatureSource from "../Logic/FeatureSource/Sources/FilteringFeatureSource" | import FilteringFeatureSource from "../src/Logic/FeatureSource/Sources/FilteringFeatureSource" | ||||||
| import { Feature } from "geojson" | import { Feature } from "geojson" | ||||||
| import { BBox } from "../Logic/BBox" | import { BBox } from "../src/Logic/BBox" | ||||||
| import { FeatureSource } from "../Logic/FeatureSource/FeatureSource" | import { FeatureSource } from "../src/Logic/FeatureSource/FeatureSource" | ||||||
| import OsmObjectDownloader from "../Logic/Osm/OsmObjectDownloader" | import OsmObjectDownloader from "../src/Logic/Osm/OsmObjectDownloader" | ||||||
| import FeaturePropertiesStore from "../Logic/FeatureSource/Actors/FeaturePropertiesStore" | import FeaturePropertiesStore from "../src/Logic/FeatureSource/Actors/FeaturePropertiesStore" | ||||||
| 
 | 
 | ||||||
| ScriptUtils.fixUtils() | ScriptUtils.fixUtils() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,11 +1,11 @@ | ||||||
| import { Utils } from "../../../Utils" | import { Utils } from "../../../src/Utils" | ||||||
| import LayoutConfig from "../../../Models/ThemeConfig/LayoutConfig" | import LayoutConfig from "../../../src/Models/ThemeConfig/LayoutConfig" | ||||||
| 
 | 
 | ||||||
| import * as bookcaseJson from "../../../assets/generated/themes/bookcases.json" | import * as bookcaseJson from "../../../src/assets/generated/themes/bookcases.json" | ||||||
| import { OsmTags } from "../../../Models/OsmFeature" | import { OsmTags } from "../../../src/Models/OsmFeature" | ||||||
| import { Feature, Geometry } from "geojson" | import { Feature, Geometry } from "geojson" | ||||||
| import { expect, it } from "vitest" | import { expect, it } from "vitest" | ||||||
| import ThemeViewState from "../../../Models/ThemeViewState" | import ThemeViewState from "../../../src/Models/ThemeViewState" | ||||||
| import ScriptUtils from "../../../scripts/ScriptUtils" | import ScriptUtils from "../../../scripts/ScriptUtils" | ||||||
| 
 | 
 | ||||||
| const latestTags = { | const latestTags = { | ||||||
|  |  | ||||||
|  | @ -1,7 +1,9 @@ | ||||||
| import CreateMultiPolygonWithPointReuseAction from "../../../Logic/Osm/Actions/CreateMultiPolygonWithPointReuseAction" | import CreateMultiPolygonWithPointReuseAction from "../../../src/Logic/Osm/Actions/CreateMultiPolygonWithPointReuseAction" | ||||||
| import { Tag } from "../../../Logic/Tags/Tag" | import { Tag } from "../../../src/Logic/Tags/Tag" | ||||||
| import { Changes } from "../../../Logic/Osm/Changes" | import { Changes } from "../../../src/Logic/Osm/Changes" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
|  | import { OsmConnection } from "../../../src/Logic/Osm/OsmConnection" | ||||||
|  | import { ImmutableStore } from "../../../src/Logic/UIEventSource" | ||||||
| 
 | 
 | ||||||
| describe("CreateMultiPolygonWithPointReuseAction", () => { | describe("CreateMultiPolygonWithPointReuseAction", () => { | ||||||
|     it("should produce a correct changeset", () => { |     it("should produce a correct changeset", () => { | ||||||
|  | @ -102,7 +104,12 @@ describe("CreateMultiPolygonWithPointReuseAction", () => { | ||||||
|                 [], |                 [], | ||||||
|                 "import" |                 "import" | ||||||
|             ) |             ) | ||||||
|             const descriptions = await action.Perform(new Changes()) |             const descriptions = await action.Perform( | ||||||
|  |                 new Changes({ | ||||||
|  |                     dryRun: new ImmutableStore(true), | ||||||
|  |                     osmConnection: new OsmConnection(), | ||||||
|  |                 }) | ||||||
|  |             ) | ||||||
| 
 | 
 | ||||||
|             const ways = descriptions.filter((d) => d.type === "way") |             const ways = descriptions.filter((d) => d.type === "way") | ||||||
|             // "unexpected id"
 |             // "unexpected id"
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import { ExtraFuncParams, ExtraFunctions } from "../../Logic/ExtraFunctions" | import { ExtraFuncParams, ExtraFunctions } from "../../src/Logic/ExtraFunctions" | ||||||
| import { OsmFeature } from "../../Models/OsmFeature" | import { OsmFeature } from "../../src/Models/OsmFeature" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| import { Feature } from "geojson" | import { Feature } from "geojson" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import * as turf from "@turf/turf" | import * as turf from "@turf/turf" | ||||||
| import { GeoOperations } from "../../Logic/GeoOperations" | import { GeoOperations } from "../../src/Logic/GeoOperations" | ||||||
| import { Feature, LineString, Polygon } from "geojson" | import { Feature, LineString, Polygon } from "geojson" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| import AllImageProviders from "../../../Logic/ImageProviders/AllImageProviders" | import AllImageProviders from "../../../src/Logic/ImageProviders/AllImageProviders" | ||||||
| import { UIEventSource } from "../../../Logic/UIEventSource" | import { UIEventSource } from "../../../src/Logic/UIEventSource" | ||||||
| import { Utils } from "../../../Utils" | import { Utils } from "../../../src/Utils" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("ImageProviders", () => { | describe("ImageProviders", () => { | ||||||
|  |  | ||||||
|  | @ -1,14 +1,14 @@ | ||||||
| import { Utils } from "../../../../Utils" | import { Utils } from "../../../../src/Utils" | ||||||
| import { OsmRelation } from "../../../../Logic/Osm/OsmObject" | import { OsmRelation } from "../../../../src/Logic/Osm/OsmObject" | ||||||
| import { | import { | ||||||
|     InPlaceReplacedmentRTSH, |     InPlaceReplacedmentRTSH, | ||||||
|     TurnRestrictionRSH, |     TurnRestrictionRSH, | ||||||
| } from "../../../../Logic/Osm/Actions/RelationSplitHandler" | } from "../../../../src/Logic/Osm/Actions/RelationSplitHandler" | ||||||
| import { Changes } from "../../../../Logic/Osm/Changes" | import { Changes } from "../../../../src/Logic/Osm/Changes" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| import OsmObjectDownloader from "../../../../Logic/Osm/OsmObjectDownloader" | import OsmObjectDownloader from "../../../../src/Logic/Osm/OsmObjectDownloader" | ||||||
| import { ImmutableStore } from "../../../../Logic/UIEventSource" | import { ImmutableStore } from "../../../../src/Logic/UIEventSource" | ||||||
| import { OsmConnection } from "../../../../Logic/Osm/OsmConnection" | import { OsmConnection } from "../../../../src/Logic/Osm/OsmConnection" | ||||||
| 
 | 
 | ||||||
| describe("RelationSplitHandler", () => { | describe("RelationSplitHandler", () => { | ||||||
|     Utils.injectJsonDownloadForTests("https://www.openstreetmap.org/api/0.6/node/1124134958/ways", { |     Utils.injectJsonDownloadForTests("https://www.openstreetmap.org/api/0.6/node/1124134958/ways", { | ||||||
|  |  | ||||||
|  | @ -1,12 +1,12 @@ | ||||||
| import { Utils } from "../../../../Utils" | import { Utils } from "../../../../src/Utils" | ||||||
| import LayoutConfig from "../../../../Models/ThemeConfig/LayoutConfig" | import LayoutConfig from "../../../../src/Models/ThemeConfig/LayoutConfig" | ||||||
| import { BBox } from "../../../../Logic/BBox" | import { BBox } from "../../../../src/Logic/BBox" | ||||||
| import ReplaceGeometryAction from "../../../../Logic/Osm/Actions/ReplaceGeometryAction" | import ReplaceGeometryAction from "../../../../src/Logic/Osm/Actions/ReplaceGeometryAction" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| import { OsmConnection } from "../../../../Logic/Osm/OsmConnection" | import { OsmConnection } from "../../../../src/Logic/Osm/OsmConnection" | ||||||
| import { ImmutableStore } from "../../../../Logic/UIEventSource" | import { ImmutableStore } from "../../../../src/Logic/UIEventSource" | ||||||
| import { Changes } from "../../../../Logic/Osm/Changes" | import { Changes } from "../../../../src/Logic/Osm/Changes" | ||||||
| import FullNodeDatabaseSource from "../../../../Logic/FeatureSource/TiledFeatureSource/FullNodeDatabaseSource" | import FullNodeDatabaseSource from "../../../../src/Logic/FeatureSource/TiledFeatureSource/FullNodeDatabaseSource" | ||||||
| 
 | 
 | ||||||
| describe("ReplaceGeometryAction", () => { | describe("ReplaceGeometryAction", () => { | ||||||
|     const grbStripped = { |     const grbStripped = { | ||||||
|  |  | ||||||
|  | @ -1,9 +1,9 @@ | ||||||
| import { Utils } from "../../../../Utils" | import { Utils } from "../../../../src/Utils" | ||||||
| import SplitAction from "../../../../Logic/Osm/Actions/SplitAction" | import SplitAction from "../../../../src/Logic/Osm/Actions/SplitAction" | ||||||
| import { Changes } from "../../../../Logic/Osm/Changes" | import { Changes } from "../../../../src/Logic/Osm/Changes" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| import { OsmConnection } from "../../../../Logic/Osm/OsmConnection" | import { OsmConnection } from "../../../../src/Logic/Osm/OsmConnection" | ||||||
| import { ImmutableStore } from "../../../../Logic/UIEventSource" | import { ImmutableStore } from "../../../../src/Logic/UIEventSource" | ||||||
| 
 | 
 | ||||||
| describe("SplitAction", () => { | describe("SplitAction", () => { | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -1,8 +1,8 @@ | ||||||
| import { ChangeDescription } from "../../../Logic/Osm/Actions/ChangeDescription" | import { ChangeDescription } from "../../../src/Logic/Osm/Actions/ChangeDescription" | ||||||
| import { Changes } from "../../../Logic/Osm/Changes" | import { Changes } from "../../../src/Logic/Osm/Changes" | ||||||
| import { expect, it } from "vitest" | import { expect, it } from "vitest" | ||||||
| import { ImmutableStore } from "../../../Logic/UIEventSource" | import { ImmutableStore } from "../../../src/Logic/UIEventSource" | ||||||
| import { OsmConnection } from "../../../Logic/Osm/OsmConnection" | import { OsmConnection } from "../../../src/Logic/Osm/OsmConnection" | ||||||
| 
 | 
 | ||||||
| it("Generate preXML from changeDescriptions", () => { | it("Generate preXML from changeDescriptions", () => { | ||||||
|     const changeDescrs: ChangeDescription[] = [ |     const changeDescrs: ChangeDescription[] = [ | ||||||
|  |  | ||||||
|  | @ -1,8 +1,8 @@ | ||||||
| import { Utils } from "../../../Utils" | import { Utils } from "../../../src/Utils" | ||||||
| import { ChangesetHandler, ChangesetTag } from "../../../Logic/Osm/ChangesetHandler" | import { ChangesetHandler, ChangesetTag } from "../../../src/Logic/Osm/ChangesetHandler" | ||||||
| import { ImmutableStore, UIEventSource } from "../../../Logic/UIEventSource" | import { ImmutableStore, UIEventSource } from "../../../src/Logic/UIEventSource" | ||||||
| import { OsmConnection } from "../../../Logic/Osm/OsmConnection" | import { OsmConnection } from "../../../src/Logic/Osm/OsmConnection" | ||||||
| import { Changes } from "../../../Logic/Osm/Changes" | import { Changes } from "../../../src/Logic/Osm/Changes" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| function elstorage() { | function elstorage() { | ||||||
|  |  | ||||||
|  | @ -1,9 +1,9 @@ | ||||||
| import { OsmObject } from "../../../Logic/Osm/OsmObject" | import { OsmObject } from "../../../src/Logic/Osm/OsmObject" | ||||||
| import { Utils } from "../../../Utils" | import { Utils } from "../../../src/Utils" | ||||||
| import ScriptUtils from "../../../scripts/ScriptUtils" | import ScriptUtils from "../../../scripts/ScriptUtils" | ||||||
| import { readFileSync } from "fs" | import { readFileSync } from "fs" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| import OsmObjectDownloader from "../../../Logic/Osm/OsmObjectDownloader" | import OsmObjectDownloader from "../../../src/Logic/Osm/OsmObjectDownloader" | ||||||
| 
 | 
 | ||||||
| describe("OsmObject", () => { | describe("OsmObject", () => { | ||||||
|     describe("download referencing ways", () => { |     describe("download referencing ways", () => { | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import { TagUtils } from "../../../Logic/Tags/TagUtils" | import { TagUtils } from "../../../src/Logic/Tags/TagUtils" | ||||||
| import { Tag } from "../../../Logic/Tags/Tag" | import { Tag } from "../../../src/Logic/Tags/Tag" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("Lazy object properties", () => { | describe("Lazy object properties", () => { | ||||||
|  |  | ||||||
|  | @ -1,9 +1,9 @@ | ||||||
| import { TagsFilter } from "../../../Logic/Tags/TagsFilter" | import { TagsFilter } from "../../../src/Logic/Tags/TagsFilter" | ||||||
| import { And } from "../../../Logic/Tags/And" | import { And } from "../../../src/Logic/Tags/And" | ||||||
| import { Tag } from "../../../Logic/Tags/Tag" | import { Tag } from "../../../src/Logic/Tags/Tag" | ||||||
| import { TagUtils } from "../../../Logic/Tags/TagUtils" | import { TagUtils } from "../../../src/Logic/Tags/TagUtils" | ||||||
| import { Or } from "../../../Logic/Tags/Or" | import { Or } from "../../../src/Logic/Tags/Or" | ||||||
| import { RegexTag } from "../../../Logic/Tags/RegexTag" | import { RegexTag } from "../../../src/Logic/Tags/RegexTag" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("Tag optimalization", () => { | describe("Tag optimalization", () => { | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| import { TagUtils } from "../../../Logic/Tags/TagUtils" | import { TagUtils } from "../../../src/Logic/Tags/TagUtils" | ||||||
| import { equal } from "assert" | import { equal } from "assert" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import { Utils } from "../../../Utils" | import { Utils } from "../../../src/Utils" | ||||||
| import Wikidata from "../../../Logic/Web/Wikidata" | import Wikidata from "../../../src/Logic/Web/Wikidata" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| const Q140 = { | const Q140 = { | ||||||
|  |  | ||||||
|  | @ -1,10 +1,10 @@ | ||||||
| import { Utils } from "../../../../Utils" | import { Utils } from "../../../../src/Utils" | ||||||
| import { DesugaringContext } from "../../../../Models/ThemeConfig/Conversion/Conversion" | import { DesugaringContext } from "../../../../src/Models/ThemeConfig/Conversion/Conversion" | ||||||
| import { LayerConfigJson } from "../../../../Models/ThemeConfig/Json/LayerConfigJson" | import { LayerConfigJson } from "../../../../src/Models/ThemeConfig/Json/LayerConfigJson" | ||||||
| import { TagRenderingConfigJson } from "../../../../Models/ThemeConfig/Json/TagRenderingConfigJson" | import { TagRenderingConfigJson } from "../../../../src/Models/ThemeConfig/Json/TagRenderingConfigJson" | ||||||
| import { PrepareLayer } from "../../../../Models/ThemeConfig/Conversion/PrepareLayer" | import { PrepareLayer } from "../../../../src/Models/ThemeConfig/Conversion/PrepareLayer" | ||||||
| import * as bookcases from "../../../../assets/layers/public_bookcase/public_bookcase.json" | import * as bookcases from "../../../../assets/layers/public_bookcase/public_bookcase.json" | ||||||
| import CreateNoteImportLayer from "../../../../Models/ThemeConfig/Conversion/CreateNoteImportLayer" | import CreateNoteImportLayer from "../../../../src/Models/ThemeConfig/Conversion/CreateNoteImportLayer" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("CreateNoteImportLayer", () => { | describe("CreateNoteImportLayer", () => { | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import LayoutConfig from "../../../../Models/ThemeConfig/LayoutConfig" | import LayoutConfig from "../../../../src/Models/ThemeConfig/LayoutConfig" | ||||||
| import { FixLegacyTheme } from "../../../../Models/ThemeConfig/Conversion/LegacyJsonConvert" | import { FixLegacyTheme } from "../../../../src/Models/ThemeConfig/Conversion/LegacyJsonConvert" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("FixLegacyTheme", () => { | describe("FixLegacyTheme", () => { | ||||||
|  |  | ||||||
|  | @ -1,13 +1,13 @@ | ||||||
| import { LayerConfigJson } from "../../../../Models/ThemeConfig/Json/LayerConfigJson" | import { LayerConfigJson } from "../../../../src/Models/ThemeConfig/Json/LayerConfigJson" | ||||||
| import { TagRenderingConfigJson } from "../../../../Models/ThemeConfig/Json/TagRenderingConfigJson" | import { TagRenderingConfigJson } from "../../../../src/Models/ThemeConfig/Json/TagRenderingConfigJson" | ||||||
| import LineRenderingConfigJson from "../../../../Models/ThemeConfig/Json/LineRenderingConfigJson" | import LineRenderingConfigJson from "../../../../src/Models/ThemeConfig/Json/LineRenderingConfigJson" | ||||||
| import { | import { | ||||||
|     ExpandRewrite, |     ExpandRewrite, | ||||||
|     PrepareLayer, |     PrepareLayer, | ||||||
|     RewriteSpecial, |     RewriteSpecial, | ||||||
| } from "../../../../Models/ThemeConfig/Conversion/PrepareLayer" | } from "../../../../src/Models/ThemeConfig/Conversion/PrepareLayer" | ||||||
| import { QuestionableTagRenderingConfigJson } from "../../../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson" | import { QuestionableTagRenderingConfigJson } from "../../../../src/Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson" | ||||||
| import RewritableConfigJson from "../../../../Models/ThemeConfig/Json/RewritableConfigJson" | import RewritableConfigJson from "../../../../src/Models/ThemeConfig/Json/RewritableConfigJson" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("ExpandRewrite", () => { | describe("ExpandRewrite", () => { | ||||||
|  |  | ||||||
|  | @ -1,15 +1,15 @@ | ||||||
| import { LayoutConfigJson } from "../../../../Models/ThemeConfig/Json/LayoutConfigJson" | import { LayoutConfigJson } from "../../../../src/Models/ThemeConfig/Json/LayoutConfigJson" | ||||||
| import { LayerConfigJson } from "../../../../Models/ThemeConfig/Json/LayerConfigJson" | import { LayerConfigJson } from "../../../../src/Models/ThemeConfig/Json/LayerConfigJson" | ||||||
| import { PrepareTheme } from "../../../../Models/ThemeConfig/Conversion/PrepareTheme" | import { PrepareTheme } from "../../../../src/Models/ThemeConfig/Conversion/PrepareTheme" | ||||||
| import { TagRenderingConfigJson } from "../../../../Models/ThemeConfig/Json/TagRenderingConfigJson" | import { TagRenderingConfigJson } from "../../../../src/Models/ThemeConfig/Json/TagRenderingConfigJson" | ||||||
| import LayoutConfig from "../../../../Models/ThemeConfig/LayoutConfig" | import LayoutConfig from "../../../../src/Models/ThemeConfig/LayoutConfig" | ||||||
| import bookcaseLayer from "../../../../assets/generated/layers/public_bookcase.json" | import bookcaseLayer from "../../../../src/assets/generated/layers/public_bookcase.json" | ||||||
| import LayerConfig from "../../../../Models/ThemeConfig/LayerConfig" | import LayerConfig from "../../../../src/Models/ThemeConfig/LayerConfig" | ||||||
| import { ExtractImages } from "../../../../Models/ThemeConfig/Conversion/FixImages" | import { ExtractImages } from "../../../../src/Models/ThemeConfig/Conversion/FixImages" | ||||||
| import cyclofix from "../../../../assets/generated/themes/cyclofix.json" | import cyclofix from "../../../../src/assets/generated/themes/cyclofix.json" | ||||||
| import { Tag } from "../../../../Logic/Tags/Tag" | import { Tag } from "../../../../src/Logic/Tags/Tag" | ||||||
| import { DesugaringContext } from "../../../../Models/ThemeConfig/Conversion/Conversion" | import { DesugaringContext } from "../../../../src/Models/ThemeConfig/Conversion/Conversion" | ||||||
| import { And } from "../../../../Logic/Tags/And" | import { And } from "../../../../src/Logic/Tags/And" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| const themeConfigJson: LayoutConfigJson = { | const themeConfigJson: LayoutConfigJson = { | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import SourceConfig from "../../../Models/ThemeConfig/SourceConfig" | import SourceConfig from "../../../src/Models/ThemeConfig/SourceConfig" | ||||||
| import { TagUtils } from "../../../Logic/Tags/TagUtils" | import { TagUtils } from "../../../src/Logic/Tags/TagUtils" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("SourceConfig", () => { | describe("SourceConfig", () => { | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import TagRenderingConfig from "../../../Models/ThemeConfig/TagRenderingConfig" | import TagRenderingConfig from "../../../src/Models/ThemeConfig/TagRenderingConfig" | ||||||
| import Locale from "../../../UI/i18n/Locale" | import Locale from "../../../src/UI/i18n/Locale" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("TagRenderingConfig", () => { | describe("TagRenderingConfig", () => { | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import { Unit } from "../../Models/Unit" | import { Unit } from "../../src/Models/Unit" | ||||||
| import { Denomination } from "../../Models/Denomination" | import { Denomination } from "../../src/Models/Denomination" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("Unit", () => { | describe("Unit", () => { | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| import SpecialVisualizations from "../../UI/SpecialVisualizations" | import SpecialVisualizations from "../../src/UI/SpecialVisualizations" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
| describe("SpecialVisualisations", () => { | describe("SpecialVisualisations", () => { | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| import { Utils } from "../Utils" | import { Utils } from "../src/Utils" | ||||||
| import LZString from "lz-string" | import LZString from "lz-string" | ||||||
| import { describe, expect, it } from "vitest" | import { describe, expect, it } from "vitest" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| import { Utils } from "../../Utils" | import { Utils } from "../../src/Utils" | ||||||
| import { existsSync, mkdirSync, readFileSync, unlinkSync } from "fs" | import { existsSync, mkdirSync, readFileSync, unlinkSync } from "fs" | ||||||
| import ScriptUtils from "../../scripts/ScriptUtils" | import ScriptUtils from "../../scripts/ScriptUtils" | ||||||
| import { main } from "../../scripts/generateCache" | import { main } from "../../scripts/generateCache" | ||||||
|  |  | ||||||
|  | @ -1,8 +1,8 @@ | ||||||
| import ScriptUtils from "../scripts/ScriptUtils" | import ScriptUtils from "../scripts/ScriptUtils" | ||||||
| import { Utils } from "../Utils" | import { Utils } from "../src/Utils" | ||||||
| import Locale from "../UI/i18n/Locale" | import Locale from "../src/UI/i18n/Locale" | ||||||
| import { beforeEach } from "vitest" | import { beforeEach } from "vitest" | ||||||
| import { ReferencingWaysMetaTagger } from "../Logic/SimpleMetaTagger" | import { ReferencingWaysMetaTagger } from "../src/Logic/SimpleMetaTagger" | ||||||
| 
 | 
 | ||||||
| beforeEach(async () => { | beforeEach(async () => { | ||||||
|     ScriptUtils.fixUtils() |     ScriptUtils.fixUtils() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue