Skip to content

Commit

Permalink
test: remove bluebird remnants from test fixture
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and codebytere committed Feb 17, 2020
1 parent e46cfaf commit c2792aa
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 159 deletions.
78 changes: 0 additions & 78 deletions test/fixtures/bluebird/node_modules/bluebird/package.json

This file was deleted.

78 changes: 0 additions & 78 deletions test/fixtures/bluebird/package.json

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/bluebird/test.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions test/fixtures/package-main-enoent/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "package-main-enoent",
"main": "./fhqwhgads.js"
}
8 changes: 8 additions & 0 deletions test/fixtures/package-main-enoent/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

// The path in "main" in "package.json" does not exist here, but it does in
// the copy in node_modules. This is being tested because bluebird tests depend
// on this behavior and it was accidentally broken by a seemingly unrelated
// commit on master.

require('package-main-enoent');
5 changes: 3 additions & 2 deletions test/parallel/test-require-invalid-main-no-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ const assert = require('assert');
const { spawnSync } = require('child_process');
const fixtures = require('../common/fixtures');

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

const { error, status, stderr } = spawnSync(process.execPath, [testFile]);

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

0 comments on commit c2792aa

Please sign in to comment.