Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Handle spaces in paths #437

Merged
merged 4 commits into from
Mar 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@
"dependencies": {
"cookie": "0.3.1",
"md5": "^2.2.1",
"stack-trace": "0.0.9",
"stack-trace": "0.0.10",
"timed-out": "4.0.1",
"uuid": "3.0.0"
},
3 changes: 3 additions & 0 deletions test/fixtures/file with spaces in path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function() {
throw new Error('boom');
};
15 changes: 15 additions & 0 deletions test/raven.utils.js
Original file line number Diff line number Diff line change
@@ -280,6 +280,21 @@ describe('raven.utils', function() {
raven.utils.parseStack(e, parseCallback);
}
});

it('should handle spaces in paths', function(done) {
var parseStack = raven.utils.parseStack;
var callback = function(frames) {
var frame = frames.pop();
frame.module.should.endWith('file with spaces in path');
frame.filename.should.endWith('file with spaces in path.js');
done();
};
try {
require('./fixtures/file with spaces in path')();
} catch (e) {
parseStack(e, callback);
}
});
});

describe('#getCulprit()', function() {