* 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)
| 98 | * @return {String} The path to the hydrated fixture. |
| 99 | */ |
| 100 | function 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. |
no test coverage detected
searching dependent graphs…