Exemplo n.º 1
0
 const preparations = () => {
   fse.outputFileSync("have_to_stay_file", "abc");
   fse.mkdirsSync("to_remove");
   fse.symlinkSync("../have_to_stay_file", "to_remove/symlink");
   // Make sure we symlinked it properly.
   expect(fse.readFileSync("to_remove/symlink", "utf8")).to.equal("abc");
 };
Exemplo n.º 2
0
function linkDependency(pkgDir: string, dependencyName: string, dependencyDir: string) {
  let dest = path.join(pkgDir, 'node_modules', dependencyName);
  // use fs-extra
  mkdirp.sync(path.dirname(dest));
  rimraf.sync(dest);
  fs.symlinkSync(dependencyDir, dest);
}
Exemplo n.º 3
0
  beforeEach((done) => {
    // Increase timeout for these tests only.
    originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
    jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;

    spyOn(console, 'error');
    // symlink custom collections to node_modules, so we can use with ng new
    // it is a bit dirty, but bootstrap-local tricks won't work here
    fs.symlinkSync(`${process.cwd()}/tests/collections/@custom`, `./node_modules/@custom`, 'dir');

    tmp.setup('./tmp')
      .then(() => process.chdir('./tmp'))
      .then(() => done());
  }, 10000);
Exemplo n.º 4
0
 const preparations = () => {
   fse.outputFileSync("dir/file.txt", "abc");
   fse.symlinkSync("dir/file.txt", "symlinked_file.txt");
 };
Exemplo n.º 5
0
 const preparations = () => {
   fse.mkdirsSync("to_copy");
   fse.symlinkSync("some/file", "to_copy/symlink");
   fse.mkdirsSync("copied");
   fse.symlinkSync("some/other_file", "copied/symlink");
 };