feat: add net.online / net.isOnline() (#21004)
This commit is contained in:
parent
1ef803d2ea
commit
df1432a315
5 changed files with 47 additions and 1 deletions
|
@ -1500,6 +1500,16 @@ describe('net module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('net.isOnline', () => {
|
||||
it('getter returns boolean', () => {
|
||||
expect(net.isOnline()).to.be.a('boolean');
|
||||
});
|
||||
|
||||
it('property returns boolean', () => {
|
||||
expect(net.online).to.be.a('boolean');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Stability and performance', () => {
|
||||
it('should free unreferenced, never-started request objects without crash', (done) => {
|
||||
net.request('https://test');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue