Skip to content

Commit 5607cd4

Browse files
Trottcodebytere
authored andcommitted
test: remove bluebird remnants from test fixture
The test fixture in test/fixtures/bluebird was largely copied from bluebird, where a regression in Node.js was discovered. Simplify the test by removing a lot of things that aren't necessary to replicate the problem. Change name from bluebird to something less likely to cause someone to believe that we are actually loading bluebird (as we are not). PR-URL: #31435 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: David Carlier <[email protected]>
1 parent dcace84 commit 5607cd4

File tree

8 files changed

+19
-159
lines changed

8 files changed

+19
-159
lines changed

test/fixtures/bluebird/node_modules/bluebird/package.json

Lines changed: 0 additions & 78 deletions
This file was deleted.

test/fixtures/bluebird/package.json

Lines changed: 0 additions & 78 deletions
This file was deleted.

test/fixtures/bluebird/test.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/fixtures/package-main-enoent/node_modules/package-main-enoent/package.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "package-main-enoent",
3+
"main": "./fhqwhgads.js"
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
// The path in "main" in "package.json" does not exist here, but it does in
4+
// the copy in node_modules. This is being tested because bluebird tests depend
5+
// on this behavior and it was accidentally broken by a seemingly unrelated
6+
// commit on master.
7+
8+
require('package-main-enoent');

test/parallel/test-require-invalid-main-no-exports.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const assert = require('assert');
1313
const { spawnSync } = require('child_process');
1414
const fixtures = require('../common/fixtures');
1515

16-
const { error, status, stderr } =
17-
spawnSync(process.execPath, [fixtures.path('bluebird', 'test.js')]);
16+
const testFile = fixtures.path('package-main-enoent', 'test.js');
17+
18+
const { error, status, stderr } = spawnSync(process.execPath, [testFile]);
1819

1920
assert.ifError(error);
2021
assert.strictEqual(status, 0, stderr);

0 commit comments

Comments
 (0)