fix: hide footnode in test environments

This commit is contained in:
mathuo 2021-04-10 16:26:25 +01:00
parent ca70217b62
commit 24c98c5830

View File

@ -1,6 +1,12 @@
function runFootnote() {
const DOCKVIEW_SUPPRESS_WATERMARK = 'DOCKVIEW_WATERMARK_SUPPRESSED';
const isTest = (window as any).process?.env?.NODE_ENV === 'test';
if (isTest) {
return; // don't spam people tests
}
const isSuppressed = !!(window as any)[DOCKVIEW_SUPPRESS_WATERMARK];
if (!isSuppressed) {