Add __TESTS__ variable to web app when the tests are running

This commit is contained in:
Jonatan Heyman 2024-10-29 17:19:14 +01:00
parent b7ffd5a2ce
commit 45c2df5c28
2 changed files with 1 additions and 2 deletions

View File

@ -122,7 +122,6 @@ function migrateBufferFileToLibrary() {
} }
migrateBufferFileToLibrary() migrateBufferFileToLibrary()
const Heynote = { const Heynote = {
platform: platform, platform: platform,
defaultFontFamily: "Hack", defaultFontFamily: "Hack",

View File

@ -26,7 +26,6 @@ const middleware = () => {
} }
} }
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
publicDir: "../public", publicDir: "../public",
@ -54,5 +53,6 @@ export default defineConfig({
define: { define: {
'__APP_VERSION__': JSON.stringify(process.env.npm_package_version), '__APP_VERSION__': JSON.stringify(process.env.npm_package_version),
'__GIT_HASH__': JSON.stringify(child.execSync('git rev-parse --short HEAD').toString().trim()), '__GIT_HASH__': JSON.stringify(child.execSync('git rev-parse --short HEAD').toString().trim()),
'__TESTS__': process.env.HEYNOTE_TESTS,
}, },
}) })