Fix redacting and removing old unit tests

This commit is contained in:
Jeffrey Morgan 2015-02-27 16:41:37 -05:00
Родитель 7dff34f1b5
Коммит 8d92f32033
2 изменённых файлов: 5 добавлений и 15 удалений

Просмотреть файл

@ -49,17 +49,6 @@ describe('SetupStore', function () {
});
});
pit('installs virtualbox if it is installed but has an outdated version', function () {
virtualBox.installed.mockReturnValue(true);
virtualBox.version.mockReturnValue(Promise.resolve('4.3.16'));
setupUtil.compareVersions.mockReturnValue(-1);
util.exec.mockReturnValue(Promise.resolve());
return setupStore.steps().install.run().then(() => {
expect(virtualBox.killall).toBeCalled();
expect(util.exec).toBeCalledWith('macsudo copycmd && fixcmd && installvbcmd');
});
});
pit('only installs binaries if virtualbox is installed', function () {
virtualBox.installed.mockReturnValue(true);
setupUtil.compareVersions.mockReturnValue(0);

Просмотреть файл

@ -51,12 +51,13 @@ bugsnag.metaData = {
};
bugsnag.beforeNotify = function(payload) {
var re = new RegExp(process.cwd().replace(' ', '\\s').replace('(','\\(').replace(')','\\)'), 'g');
payload.stacktrace = payload.stacktrace.replace(re, '<redacted codedir>');
payload.context = payload.context.replace(re, '<redacted codedir>');
payload.file = payload.file.replace(re, '<redacted codedir>');
var re = new RegExp(process.cwd().replace(/\s+/g, '\\s+').replace(/\(/g,'\\(').replace(/\)/g,'\\)').replace(/\//g, '\\/'), 'g');
payload.stacktrace = payload.stacktrace.replace(/%20/g, ' ').replace(re, '<redacted codedir>');
payload.context = payload.context.replace(/%20/g, ' ').replace(re, '<redacted codedir>');
payload.file = payload.file.replace(/%20/g, ' ').replace(re, '<redacted codedir>');
payload.url = '<redacted url>';
};
bugsnag.notify(new Error('test'));
document.onkeydown = function (e) {
e = e || window.event;