mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 04:39:01 +00:00
Make module types explicit and convert some to ESM (#15964)
This commit is contained in:
15
test/setup.cjs
Normal file
15
test/setup.cjs
Normal file
@@ -0,0 +1,15 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
process.env.TZ = "Etc/UTC";
|
||||
process.env.IS_TEST = "true";
|
||||
|
||||
global.window = {};
|
||||
global.navigator = {};
|
||||
|
||||
const MDI_OUTPUT_DIR = path.resolve(__dirname, "../build/mdi");
|
||||
|
||||
if (!fs.existsSync(MDI_OUTPUT_DIR)) {
|
||||
fs.mkdirSync(MDI_OUTPUT_DIR, { recursive: true });
|
||||
fs.writeFileSync(path.resolve(MDI_OUTPUT_DIR, "iconMetadata.json"), "{}");
|
||||
}
|
||||
Reference in New Issue
Block a user