Skip to content

Commit

Permalink
Release v1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 14, 2024
1 parent 04d6ba2 commit 26563ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/server-listening.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! server-listening v1.2.2 ~~ https://github.com/center-key/server-listening ~~ MIT License
//! server-listening v1.2.3 ~~ https://github.com/center-key/server-listening ~~ MIT License

import { JSDOM, BaseOptions, DOMWindow } from 'jsdom';
import { Server } from 'http';
Expand Down
6 changes: 3 additions & 3 deletions dist/server-listening.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! server-listening v1.2.2 ~~ https://github.com/center-key/server-listening ~~ MIT License
//! server-listening v1.2.3 ~~ https://github.com/center-key/server-listening ~~ MIT License

import { JSDOM } from 'jsdom';
import express from 'express';
Expand All @@ -21,9 +21,9 @@ const serverListening = {
return new Promise(resolve => server.close(resolve));
},
jsdomOnLoad(dom) {
const name = dom && dom.constructor && dom.constructor.name;
const name = dom?.constructor?.name;
if (name !== 'JSDOM')
throw Error(`[server-listening] Unable to load DOM: ${name} => ${String(dom)}`);
throw new Error(`[server-listening] Unable to load DOM: ${String(dom)} => ${name}`);
let done;
dom.window.onload = () => done(dom);
return new Promise(resolve => done = resolve);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server-listening",
"version": "1.2.2",
"version": "1.2.3",
"description": "Simple promise to wait for server ready inside a mocha specification",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -70,7 +70,7 @@
"@eslint/js": "~9.9",
"@types/express": "~4.17",
"@types/jsdom": "~21.1",
"@types/node": "~22.2",
"@types/node": "~22.3",
"add-dist-header": "~1.4",
"assert-deep-strict-equal": "~1.2",
"copy-file-util": "~1.2",
Expand Down

0 comments on commit 26563ac

Please sign in to comment.