| 
									
										
										
										
											2024-01-23 19:04:35 +08:00
										 |  |  | import * as styles1 from "./style.less"; | 
					
						
							|  |  |  | import * as styles2 from "./style.modules.less"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | it("should prefer relative", () => { | 
					
						
							| 
									
										
										
										
											2025-04-06 20:53:42 +08:00
										 |  |  | 	expect(styles1).toEqual({}); | 
					
						
							| 
									
										
										
										
											2024-01-23 19:04:35 +08:00
										 |  |  | 	expect(styles2).toEqual(nsObj({ | 
					
						
							| 
									
										
										
										
											2024-11-02 01:15:02 +08:00
										 |  |  | 		"style-module": "_style_modules_less-style-module", | 
					
						
							| 
									
										
										
										
											2024-01-23 19:04:35 +08:00
										 |  |  | 	})); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	const style = getComputedStyle(document.body); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	expect(style.getPropertyValue("background")).toBe(" red"); | 
					
						
							|  |  |  | 	expect(style.getPropertyValue("color")).toBe(" red"); | 
					
						
							|  |  |  | }); |