forked from yarnpkg/yarn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yarnpkg#886] Added test for missing bundledDependencies
- Loading branch information
Showing
26 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,10 @@ import {run as check} from '../../../src/cli/commands/check.js'; | |
import * as constants from '../../../src/constants.js'; | ||
import * as reporters from '../../../src/reporters/index.js'; | ||
import {parse} from '../../../src/lockfile/wrapper.js'; | ||
import {Install} from '../../../src/cli/commands/install.js'; | ||
import {Install, run as install} from '../../../src/cli/commands/install.js'; | ||
import Lockfile from '../../../src/lockfile/wrapper.js'; | ||
import * as fs from '../../../src/util/fs.js'; | ||
import {getPackageVersion, explodeLockfile, runInstall, createLockfile} from '../_helpers.js'; | ||
import {getPackageVersion, explodeLockfile, runInstall, createLockfile, run as buildRun} from '../_helpers.js'; | ||
|
||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 150000; | ||
|
||
|
@@ -958,3 +958,29 @@ test.concurrent('top level patterns should match after install', (): Promise<voi | |
expect(integrityError).toBe(false); | ||
}); | ||
}); | ||
|
||
test.concurrent('warns for missing bundledDependencies', (): Promise<void> => { | ||
const fixturesLoc = path.join(__dirname, '..', '..', 'fixtures', 'install'); | ||
|
||
return buildRun( | ||
reporters.BufferReporter, | ||
fixturesLoc, | ||
async (args, flags, config, reporter): Promise<void> => { | ||
await install(config, reporter, flags, args); | ||
|
||
const output = reporter.getBuffer(); | ||
const warnings = output.filter(entry => entry.type === 'warning'); | ||
|
||
expect( | ||
warnings.some(warning => { | ||
return ( | ||
warning.data.toString().indexOf(reporter.lang('missingBundledDependency', '[email protected]', 'tap-consumer')) > -1 | ||
); | ||
}), | ||
).toEqual(true); | ||
}, | ||
[], | ||
{}, | ||
'missing-bundled-dep', | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"tap": "0.3.1" | ||
} | ||
} |
Binary file added
BIN
+1.06 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/buffer-equal.bin
Binary file not shown.
Binary file added
BIN
+2.51 KB
...fixtures/request-cache/GET/registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.2.tgz.bin
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.83 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/bunker/-/bunker-0.1.2.tgz.bin
Binary file not shown.
Binary file added
BIN
+1.73 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/burrito.bin
Binary file not shown.
Binary file added
BIN
+44.7 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/burrito/-/burrito-0.2.12.tgz.bin
Binary file not shown.
Binary file added
BIN
+5.89 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/charm/-/charm-0.1.2.tgz.bin
Binary file not shown.
Binary file added
BIN
+2.56 KB
...s__/fixtures/request-cache/GET/registry.yarnpkg.com/deep-equal/-/deep-equal-0.0.0.tgz.bin
Binary file not shown.
Binary file added
BIN
+1.43 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/difflet.bin
Binary file not shown.
Binary file added
BIN
+5.36 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/difflet/-/difflet-0.2.6.tgz.bin
Binary file not shown.
Binary file added
BIN
+4.75 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz.bin
Binary file not shown.
Binary file added
BIN
+10.6 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/nopt/-/nopt-2.2.1.tgz.bin
Binary file not shown.
Binary file added
BIN
+985 Bytes
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/runforcover.bin
Binary file not shown.
Binary file added
BIN
+3.38 KB
..._/fixtures/request-cache/GET/registry.yarnpkg.com/runforcover/-/runforcover-0.0.2.tgz.bin
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+31.4 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/tap/-/tap-0.3.1.tgz.bin
Binary file not shown.
Binary file added
BIN
+2.29 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/traverse.bin
Binary file not shown.
Binary file added
BIN
+10.8 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/traverse/-/traverse-0.5.2.tgz.bin
Binary file not shown.
Binary file added
BIN
+11.6 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz.bin
Binary file not shown.
Binary file added
BIN
+61.8 KB
...sts__/fixtures/request-cache/GET/registry.yarnpkg.com/uglify-js/-/uglify-js-1.1.1.tgz.bin
Binary file not shown.
Binary file added
BIN
+1.17 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/yamlish.bin
Binary file not shown.
Binary file added
BIN
+12.9 KB
__tests__/fixtures/request-cache/GET/registry.yarnpkg.com/yamlish/-/yamlish-0.0.7.tgz.bin
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters