File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed
Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ class Incidents extends Base {
2222 /**
2323 * Returns a list of all open incidents
2424 *
25- * @param {Object } [params] - example { status: 'open' }
26- * Note: the status query parameter is required
25+ * @param {Object } [params] - example { status: 'open', severity: 'warning' }
2726 * @returns {Promise } - Returns a resolved Promise with a response from the Mux API
2827 *
2928 * @example
@@ -35,11 +34,6 @@ class Incidents extends Base {
3534 * @see https://api-docs.mux.com/#incident-get
3635 */
3736 list ( params ) {
38- if ( ! params || ( params && ! params . status ) ) {
39- throw new Error (
40- 'The status query parameter is required for listing incidents.'
41- ) ;
42- }
4337 return this . http . get ( PATH , { params } ) ;
4438 }
4539
Original file line number Diff line number Diff line change @@ -43,15 +43,6 @@ describe('Unit::Incidents', () => {
4343 /** @test {Incidents.list} */
4444 describe ( 'Incidents.list' , ( ) => {
4545 /** @test {Incidents.list} */
46- it ( 'throws an error if the status query parameter is not provided' , ( ) => {
47- expect ( ( ) => incidentsInstance . list ( ) ) . to . throw (
48- 'The status query parameter is required for listing incidents.'
49- ) ;
50- expect ( ( ) => incidentsInstance . list ( { } ) ) . to . throw (
51- 'The status query parameter is required for listing incidents.'
52- ) ;
53- } ) ;
54-
5546 it ( 'makes a get request to the Mux data incidents route' , done => {
5647 moxios . stubRequest ( 'https://api.mux.com/data/v1/incidents?status=open' , {
5748 status : 200 ,
You can’t perform that action at this time.
0 commit comments