Example #1
0
 function cb(err, stdout, stderr) {
   expect(err).toEqual(null);
   expect(stderr).toEqual('');
   var requiring = eraseTime(headLines(stdout, 1));
   expect(requiring).toEqual('Requiring external module ../preload');
   var preload1 = eraseTime(headLines(stdout, 1, 4));
   expect(preload1).toEqual('hello preload!');
   done(err);
 }
Example #2
0
    function cb(err, stdout, stderr) {
      expect(err).toEqual(null);
      expect(stderr).toEqual('');

      var absolute = path.join(__dirname, './fixtures/config/flags/require/preload');
      var requiring = eraseTime(headLines(stdout, 1));
      expect(requiring).toEqual('Requiring external module ' + absolute);
      var preload1 = eraseTime(headLines(stdout, 1, 4));
      expect(preload1).toEqual('hello preload!');
      done(err);
    }
Example #3
0
    function cb(err, stdout, stderr) {
      expect(err).toEqual(null);
      expect(stderr).toEqual('');

      var requiring1 = eraseTime(headLines(stdout, 1));
      expect(requiring1).toEqual('Requiring external module ./preload_one');
      var requiring2 = eraseTime(headLines(stdout, 1, 1));
      expect(requiring2).toEqual('Requiring external module ./preload_two');
      var preload1 = eraseTime(headLines(stdout, 1, 4));
      expect(preload1).toEqual('preload one!');
      var preload2 = eraseTime(headLines(stdout, 1, 5));
      expect(preload2).toEqual('preload two!');
      done(err);
    }
 .run(function(err, stdout, stderr) {
   expect(err).toEqual(null);
   expect(stderr).toEqual('');
   expect(headLines(eraseTime(stdout), 2)).toMatch(
    'Node flags detected: --harmony\n' +
    'Respawned to PID: ');
   done(err);
 });
 .run(function(err, stdout, stderr) {
   expect(err).toEqual(null);
   expect(stderr).toEqual('');
   expect(headLines(eraseTime(stdout), 2)).toMatch(
     'Failed to load external module mymodule\n' +
     'Error: Cannot find module \'mymodule\' from \'');
   done();
 });