Skip to content

Commit

Permalink
test: ensure check passes on newer Node.js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Apr 13, 2024
1 parent f3d2ee0 commit da169f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/node_modules/@stdlib/net/http-server/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,13 @@ tape( 'the server will listen on a specified hostname', function test( t ) {
create( onServer );

function onServer( error, server ) {
var address;

if ( error ) {
t.ok( false, error.message );
} else {
t.equal( server.address().address, '127.0.0.1', 'listens on address 127.0.0.1 (localhost)' );
address = server.address().address;
t.ok( address === '127.0.0.1' || address === '::1', 'listens on address 127.0.0.1 (localhost)' );
}
server.close();
t.end();
Expand Down

0 comments on commit da169f0

Please sign in to comment.