fix: Test- en linting-errors opgelost
This commit is contained in:
parent
ce5c0ea629
commit
ba912c3ef0
20 changed files with 103 additions and 116 deletions
|
@ -2,13 +2,13 @@ import fs from 'fs';
|
|||
import path from 'node:path';
|
||||
import {fileURLToPath} from "node:url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const fileName = fileURLToPath(import.meta.url);
|
||||
const dirName = path.dirname(fileName);
|
||||
|
||||
/**
|
||||
* Load the asset at the given path.
|
||||
* @param relPath Path of the asset relative to the test-assets folder.
|
||||
*/
|
||||
export function loadTestAsset(relPath: string): Buffer {
|
||||
return fs.readFileSync(path.resolve(__dirname, `../test_assets/${relPath}`));
|
||||
return fs.readFileSync(path.resolve(dirName, `../test_assets/${relPath}`));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue