MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / linkDependencies

Function linkDependencies

tests/helpers/acceptance.js:100–119  ·  view source on GitHub ↗

* Creates symbolic links from the dependency temp directories * to the project that is under test. * * @method linkDependencies * @param {String} projectName The name of the project under test * @return {String} The path to the hydrated fixture.

(projectName)

Source from the content-addressed store, hash-verified

98 * @return {String} The path to the hydrated fixture.
99 */
100function linkDependencies(projectName) {
101 let sourceFixture = dirs[projectName]; // original fixture for this acceptance test.
102 let runFixture = quickTemp.makeOrRemake(dirs, `${projectName}-clone`);
103
104 fs.copySync(sourceFixture, runFixture);
105
106 let nodeManifest = fs.readFileSync(path.join(runFixture, 'package.json'));
107
108 let packageCache = new PackageCache(root);
109 let packager = hasGlobalYarn ? 'yarn' : 'npm';
110
111 packageCache.create('node', packager, nodeManifest, [{ name: 'ember-cli', path: root }]);
112
113 let nodeModulesPath = path.join(runFixture, 'node_modules');
114 symlinkOrCopySync(path.join(packageCache.get('node'), 'node_modules'), nodeModulesPath);
115
116 process.chdir(runFixture);
117
118 return runFixture;
119}
120
121/**
122 * Clean a test run.

Calls 2

createMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…