Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced common.fixturesDir with usage of common.fixtures module #15840

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/parallel/test-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

/* eslint-disable strict */
const common = require('../common');
const fixtures = require('../common/fixtures');

const assert = require('assert');
const path = require('path');
Expand All @@ -40,7 +41,7 @@ assert.strictEqual(baseBar, // eslint-disable-line no-undef
'bar',
'global.x -> x in base level not working');

const mod = require(path.join(common.fixturesDir, 'global', 'plain'));
const mod = require(path.join(fixtures.fixturesDir, 'global', 'plain'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be using method fixtures.path instead of path.join.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pawelgolda is correct, the correct change here would be:

const mod = require(fixtures.path('global', 'plain'));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to fix this while landing.

const fooBar = mod.fooBar;

assert.strictEqual(fooBar.foo, 'foo', 'x -> global.x in sub level not working');
Expand Down