Skip to content

Commit

Permalink
remove dirname workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Mar 21, 2024
1 parent 3dda90b commit 79f645d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
7 changes: 2 additions & 5 deletions tests/commands.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ import * as assert from 'uvu/assert';
import * as MakeNSIS from '../dist/makensis.js';
import path from 'node:path';

// Temporary workaround
const __dirname = path.resolve(path.dirname(''));

const scriptFile = {
minimal: path.join(__dirname, 'tests', 'fixtures', 'utf8.nsi'),
warning: path.join(__dirname, 'tests', 'fixtures', 'warnings.nsi'),
minimal: path.join(process.cwd(), 'tests', 'fixtures', 'utf8.nsi'),
warning: path.join(process.cwd(), 'tests', 'fixtures', 'warnings.nsi'),
};

// Let's run the tests
Expand Down
5 changes: 1 addition & 4 deletions tests/encoding.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ import * as assert from 'uvu/assert';
import * as MakeNSIS from '../dist/makensis.js';
import path from 'node:path';

// Temporary workaround
const __dirname = path.resolve(path.dirname(''));

// Compiler arguments
const script = {
// cp850: join(__dirname, 'fixtures', 'cp850.nsi'),
utf8: path.join(__dirname, 'tests', 'fixtures', 'utf8.nsi'),
utf8: path.join(process.cwd(), 'tests', 'fixtures', 'utf8.nsi'),
};

const defaultOptions = {
Expand Down
5 changes: 1 addition & 4 deletions tests/environment.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import * as MakeNSIS from '../dist/makensis.js';
import path from 'node:path';
import which from 'which';

// Temporary workaround
const __dirname = path.resolve(path.dirname(''));

const scriptFile = path.join(__dirname, 'tests', 'fixtures', 'env.nsi');
const scriptFile = path.join(process.cwd(), 'tests', 'fixtures', 'env.nsi');

const defaultOptions = {
define: {
Expand Down

0 comments on commit 79f645d

Please sign in to comment.