How to use the throws function from should

Find comprehensive JavaScript should.throws code examples handpicked from public code repositorys.

111
112
113
114
115
116
117
118
119
120
      done();
    });
});

it('throw when empty', () => {
  should.throws(() => {
    request
    .post(`${base}/echo`)
    .field()
  }, /name/);
fork icon0
star icon0
watch icon1

+ 3 other calls in file