Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ad4af04

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
test,module: add test for exports cjs loader check
Refs: #31001 (comment) PR-URL: #31427 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent db5ec52 commit ad4af04
Copy full SHA for ad4af04

File tree

Expand file treeCollapse file tree

5 files changed

+177
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+177
-0
lines changed
Open diff view settings
Collapse file

‎test/fixtures/bluebird/node_modules/bluebird/js/release/bluebird.js‎

Copy file name to clipboardExpand all lines: test/fixtures/bluebird/node_modules/bluebird/js/release/bluebird.js
Whitespace-only changes.
Collapse file

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

Copy file name to clipboardExpand all lines: test/fixtures/bluebird/node_modules/bluebird/package.json
+78Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file
+78Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"name": "bluebird",
3+
"description": "Full featured Promises/A+ implementation with exceptionally good performance",
4+
"version": "3.7.2",
5+
"keywords": [
6+
"promise",
7+
"performance",
8+
"promises",
9+
"promises-a",
10+
"promises-aplus",
11+
"async",
12+
"await",
13+
"deferred",
14+
"deferreds",
15+
"future",
16+
"flow control",
17+
"dsl",
18+
"fluent interface"
19+
],
20+
"scripts": {
21+
"lint": "node scripts/jshint.js",
22+
"test": "node --expose-gc tools/test.js",
23+
"istanbul": "istanbul",
24+
"prepublish": "npm run generate-browser-core && npm run generate-browser-full",
25+
"generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify",
26+
"generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js"
27+
},
28+
"homepage": "https://github.com/petkaantonov/bluebird",
29+
"repository": {
30+
"type": "git",
31+
"url": "git://github.com/petkaantonov/bluebird.git"
32+
},
33+
"bugs": {
34+
"url": "http://github.com/petkaantonov/bluebird/issues"
35+
},
36+
"license": "MIT",
37+
"author": {
38+
"name": "Petka Antonov",
39+
"email": "petka_antonov@hotmail.com",
40+
"url": "http://github.com/petkaantonov/"
41+
},
42+
"devDependencies": {
43+
"acorn": "^6.0.2",
44+
"acorn-walk": "^6.1.0",
45+
"baconjs": "^0.7.43",
46+
"bluebird": "^2.9.2",
47+
"body-parser": "^1.10.2",
48+
"browserify": "^8.1.1",
49+
"cli-table": "~0.3.1",
50+
"co": "^4.2.0",
51+
"cross-spawn": "^0.2.3",
52+
"glob": "^4.3.2",
53+
"grunt-saucelabs": "~8.4.1",
54+
"highland": "^2.3.0",
55+
"istanbul": "^0.3.5",
56+
"jshint": "^2.6.0",
57+
"jshint-stylish": "~0.2.0",
58+
"kefir": "^2.4.1",
59+
"mkdirp": "~0.5.0",
60+
"mocha": "~2.1",
61+
"open": "~0.0.5",
62+
"optimist": "~0.6.1",
63+
"rimraf": "~2.2.6",
64+
"rx": "^2.3.25",
65+
"serve-static": "^1.7.1",
66+
"sinon": "~1.7.3",
67+
"uglify-js": "~2.4.16"
68+
},
69+
"readmeFilename": "README.md",
70+
"main": "./js/release/bluebird.js",
71+
"webpack": "./js/release/bluebird.js",
72+
"browser": "./js/browser/bluebird.js",
73+
"files": [
74+
"js/browser",
75+
"js/release",
76+
"LICENSE"
77+
]
78+
}
Collapse file

‎test/fixtures/bluebird/test.js‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('bluebird')
Collapse file
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
require('../common');
4+
5+
// Test that a nonexistent "main" entry in a package.json that also omits an
6+
// "exports" entry will be ignored if it can be found in node_modules instead
7+
// rather than throwing.
8+
//
9+
// Throwing is perhaps "correct" behavior, but it will break bluebird tests
10+
// as of this writing.
11+
12+
const assert = require('assert');
13+
const { spawnSync } = require('child_process');
14+
const fixtures = require('../common/fixtures');
15+
16+
const { error, status, stderr } =
17+
spawnSync(process.execPath, [fixtures.path('bluebird', 'test.js')]);
18+
19+
assert.ifError(error);
20+
assert.strictEqual(status, 0, stderr);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.