Skip to content

Commit

Permalink
Widget: fix for __dirname in module
Browse files Browse the repository at this point in the history
  • Loading branch information
gusthoff committed Nov 2, 2024
1 parent 8e13d09 commit 5ba773d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/tests/ts/widget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ import {getElemsByTag, getElemById, getElemsByClass}

global.WebSocket = WebSocket;

import { fileURLToPath } from 'url';
import { dirname } from 'path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

/**
* Helper function to fill DOM from a file
*
Expand Down

0 comments on commit 5ba773d

Please sign in to comment.