test: make sure tests fail properly instead of timing out (#24316)
This commit is contained in:
parent
451086d7f2
commit
c6db47182a
20 changed files with 1484 additions and 1367 deletions
|
@ -305,8 +305,12 @@ describe('protocol module', () => {
|
|||
|
||||
it('can access request headers', (done) => {
|
||||
protocol.registerHttpProtocol(protocolName, (request) => {
|
||||
expect(request).to.have.property('headers');
|
||||
done();
|
||||
try {
|
||||
expect(request).to.have.property('headers');
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
ajax(protocolName + '://fake-host');
|
||||
});
|
||||
|
@ -597,8 +601,12 @@ describe('protocol module', () => {
|
|||
|
||||
it('can access request headers', (done) => {
|
||||
protocol.interceptHttpProtocol('http', (request) => {
|
||||
expect(request).to.have.property('headers');
|
||||
done();
|
||||
try {
|
||||
expect(request).to.have.property('headers');
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
ajax('http://fake-host');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue