CB-11259: Improving build output

This closes #305
This commit is contained in:
Richard Knoll
2016-05-03 16:25:48 -07:00
parent e9e27ca47c
commit 9738079c42
11 changed files with 49 additions and 41 deletions
+5 -4
View File
@@ -47,8 +47,9 @@ describe('common platform handler', function() {
it('should throw if src not in plugin directory', function(){
shell.mkdir('-p', project_dir);
fs.writeFileSync(non_plugin_file, 'contents', 'utf-8');
expect(function(){copyFile(test_dir, '../non_plugin_file', project_dir, dest);}).
toThrow(new Error('"' + non_plugin_file + '" not located within plugin!'));
var outside_file = '../non_plugin_file';
expect(function(){copyFile(test_dir, outside_file, project_dir, dest);}).
toThrow(new Error('File "' + path.resolve(test_dir, outside_file) + '" is located outside the plugin directory "' + test_dir + '"'));
shell.rm('-rf', test_dir);
});
@@ -75,7 +76,7 @@ describe('common platform handler', function() {
}
expect(function(){copyFile(test_dir, symlink_file, project_dir, dest);}).
toThrow(new Error('"' + symlink_file + '" not located within plugin!'));
toThrow(new Error('File "' + path.resolve(test_dir, symlink_file) + '" is located outside the plugin directory "' + test_dir + '"'));
shell.rm('-rf', project_dir);
});
@@ -83,7 +84,7 @@ describe('common platform handler', function() {
shell.mkdir('-p', java_dir);
fs.writeFileSync(java_file, 'contents', 'utf-8');
expect(function(){copyFile(test_dir, java_file, project_dir, non_plugin_file);}).
toThrow(new Error('"' + non_plugin_file + '" not located within project!'));
toThrow(new Error('Destination "' + path.resolve(project_dir, non_plugin_file) + '" for source file "' + path.resolve(test_dir, java_file) + '" is located outside the project'));
shell.rm('-rf', project_dir);
});