| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  | import { describe } from "mocha" | 
					
						
							|  |  |  | import { expect } from "chai" | 
					
						
							|  |  |  | import SourceConfig from "../../../Models/ThemeConfig/SourceConfig" | 
					
						
							|  |  |  | import { TagUtils } from "../../../Logic/Tags/TagUtils" | 
					
						
							| 
									
										
										
										
											2022-04-14 00:53:38 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | describe("SourceConfig", () => { | 
					
						
							|  |  |  |     it("should throw an error on conflicting tags", () => { | 
					
						
							|  |  |  |         expect(() => { | 
					
						
							|  |  |  |             new SourceConfig( | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                     osmTags: TagUtils.Tag({ | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |                         and: ["x=y", "a=b", "x!=y"], | 
					
						
							|  |  |  |                     }), | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |                 false | 
					
						
							| 
									
										
										
										
											2022-04-14 00:53:38 +02:00
										 |  |  |             ) | 
					
						
							|  |  |  |         }).to.throw(/tags are conflicting/) | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  | }) |