-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change upload-all to upload crash reports by default (#269)
* Change upload-all to upload crash reports by default * switch to --include-crashes instead * Add warning message when crash reports are skipped during upload
- Loading branch information
1 parent
ef19c49
commit 94b9b6e
Showing
4 changed files
with
112 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { RecordingEntry, filterRecordings } from "./main"; | ||
|
||
describe("filterRecordings", () => { | ||
it("excludes crash reports by default", () => { | ||
const recordings: RecordingEntry[] = [ | ||
{ | ||
status: "crashed", | ||
id: "1", | ||
createTime: new Date(), | ||
metadata: {}, | ||
runtime: "chromium", | ||
sourcemaps: [], | ||
}, | ||
{ | ||
status: "crashUploaded", | ||
id: "2", | ||
createTime: new Date(), | ||
metadata: {}, | ||
runtime: "chromium", | ||
sourcemaps: [], | ||
}, | ||
{ | ||
status: "onDisk", | ||
id: "3", | ||
createTime: new Date(), | ||
metadata: {}, | ||
runtime: "chromium", | ||
sourcemaps: [], | ||
}, | ||
]; | ||
|
||
const filtered = filterRecordings(recordings, r => r.id === "3", false); | ||
expect(filtered).toHaveLength(1); | ||
}); | ||
it("inclues crash reports when includeCrashes is set", () => { | ||
const recordings: RecordingEntry[] = [ | ||
{ | ||
status: "crashed", | ||
id: "1", | ||
createTime: new Date(), | ||
metadata: {}, | ||
runtime: "chromium", | ||
sourcemaps: [], | ||
}, | ||
{ | ||
status: "crashUploaded", | ||
id: "2", | ||
createTime: new Date(), | ||
metadata: {}, | ||
runtime: "chromium", | ||
sourcemaps: [], | ||
}, | ||
{ | ||
status: "onDisk", | ||
id: "3", | ||
createTime: new Date(), | ||
metadata: {}, | ||
runtime: "chromium", | ||
sourcemaps: [], | ||
}, | ||
]; | ||
|
||
const filtered = filterRecordings(recordings, r => r.id === "3", true); | ||
expect(filtered).toHaveLength(2); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters