text: // deno-fmt-ignore-file
  // deno-lint-ignore-file
  
  // Copyright Joyent and Node contributors. All rights reserved. MIT license.
  // Taken from Node 16.11.1
  // This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually
  
  'use strict';
  const common = require('../common');
  const assert = require('assert');
  const net = require('net');
  
  const server = net.createServer();
  
  assert.strictEqual(server.listening, false);
  
  server.listen(0, common.mustCall(() => {
    assert.strictEqual(server.listening, true);
  
    server.close(common.mustCall(() => {
      assert.strictEqual(server.listening, false);
    }));
  }));
  