mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [kbn-build/linkExectuables] add test with dev dependencies * [kbn-build/linkProjectExecutables] update test snapshots
This commit is contained in:
parent
9e885e88be
commit
247e43dab4
2 changed files with 35 additions and 4 deletions
|
@ -9,6 +9,9 @@ Object {
|
|||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/bar/bin/bar.js",
|
||||
],
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/bar/bin/bar.js",
|
||||
],
|
||||
],
|
||||
"mkdirp": Array [],
|
||||
}
|
||||
|
@ -21,6 +24,10 @@ Object {
|
|||
"<repoRoot>/packages/kbn-build/src/utils/foo/node_modules/.bin/bar",
|
||||
"755",
|
||||
],
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/baz/node_modules/.bin/bar",
|
||||
"755",
|
||||
],
|
||||
],
|
||||
"createSymlink": Array [
|
||||
Array [
|
||||
|
@ -28,17 +35,28 @@ Object {
|
|||
"<repoRoot>/packages/kbn-build/src/utils/foo/node_modules/.bin/bar",
|
||||
"exec",
|
||||
],
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/bar/bin/bar.js",
|
||||
"<repoRoot>/packages/kbn-build/src/utils/baz/node_modules/.bin/bar",
|
||||
"exec",
|
||||
],
|
||||
],
|
||||
"isDirectory": Array [],
|
||||
"isFile": Array [
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/bar/bin/bar.js",
|
||||
],
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/bar/bin/bar.js",
|
||||
],
|
||||
],
|
||||
"mkdirp": Array [
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/foo/node_modules/.bin",
|
||||
],
|
||||
Array [
|
||||
"<repoRoot>/packages/kbn-build/src/utils/baz/node_modules/.bin",
|
||||
],
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
@ -48,5 +66,8 @@ Array [
|
|||
Array [
|
||||
"[foo] bar -> ../bar/bin/bar.js",
|
||||
],
|
||||
Array [
|
||||
"[baz] bar -> ../bar/bin/bar.js",
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
|
|
@ -6,6 +6,7 @@ import {
|
|||
} from '../test_helpers';
|
||||
import { linkProjectExecutables } from './link_project_executables';
|
||||
import { Project } from './project';
|
||||
import { buildProjectGraph } from './projects';
|
||||
|
||||
const projectsByName = new Map([
|
||||
[
|
||||
|
@ -30,12 +31,21 @@ const projectsByName = new Map([
|
|||
resolve(__dirname, 'bar')
|
||||
),
|
||||
],
|
||||
[
|
||||
'baz',
|
||||
new Project(
|
||||
{
|
||||
name: 'baz',
|
||||
devDependencies: {
|
||||
bar: 'link:../bar',
|
||||
},
|
||||
},
|
||||
resolve(__dirname, 'baz')
|
||||
),
|
||||
],
|
||||
]);
|
||||
|
||||
const projectGraph = new Map([
|
||||
['foo', [projectsByName.get('bar')]],
|
||||
['bar', []],
|
||||
]);
|
||||
const projectGraph = buildProjectGraph(projectsByName);
|
||||
|
||||
function getFsMockCalls() {
|
||||
const fs = require('./fs');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue