summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Satanshu Mishra <florian-lefebvre@users.noreply.github.com> 2024-03-01 08:33:27 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2024-03-01 08:33:27 +0000
commit3351f7400e9d12a0e601d2eb9c9e35c97b73b853 (patch)
tree8c47a78f93e8bacfbe9d3bc61f3f038d16b0527f
parent88a242b3fc342fbfbe869b0e87f00c9ed92e1b4a (diff)
downloadastro-3351f7400e9d12a0e601d2eb9c9e35c97b73b853.tar.gz
astro-3351f7400e9d12a0e601d2eb9c9e35c97b73b853.tar.zst
astro-3351f7400e9d12a0e601d2eb9c9e35c97b73b853.zip
[ci] format
-rw-r--r--packages/integrations/node/src/standalone.ts2
-rw-r--r--packages/integrations/node/test/server-host.test.js28
2 files changed, 15 insertions, 15 deletions
diff --git a/packages/integrations/node/src/standalone.ts b/packages/integrations/node/src/standalone.ts
index 9567e8ab4..843055df3 100644
--- a/packages/integrations/node/src/standalone.ts
+++ b/packages/integrations/node/src/standalone.ts
@@ -10,7 +10,7 @@ import { createStaticHandler } from './serve-static.js';
import type { Options } from './types.js';
// Used to get Host Value at Runtime
-export const hostOptions = (host: Options["host"]): string => {
+export const hostOptions = (host: Options['host']): string => {
if (typeof host === 'boolean') {
return host ? '0.0.0.0' : 'localhost';
}
diff --git a/packages/integrations/node/test/server-host.test.js b/packages/integrations/node/test/server-host.test.js
index 4c987ab23..facd32d47 100644
--- a/packages/integrations/node/test/server-host.test.js
+++ b/packages/integrations/node/test/server-host.test.js
@@ -1,21 +1,21 @@
-import { describe, it } from 'node:test';
import * as assert from 'node:assert/strict';
+import { describe, it } from 'node:test';
import { hostOptions } from '../dist/standalone.js';
describe('host', () => {
- it('returns "0.0.0.0" when host is true', () => {
- const options = { host: true };
- assert.equal(hostOptions(options.host), '0.0.0.0');
- });
+ it('returns "0.0.0.0" when host is true', () => {
+ const options = { host: true };
+ assert.equal(hostOptions(options.host), '0.0.0.0');
+ });
- it('returns "localhost" when host is false', () => {
- const options = { host: false };
- assert.equal(hostOptions(options.host), 'localhost');
- });
+ it('returns "localhost" when host is false', () => {
+ const options = { host: false };
+ assert.equal(hostOptions(options.host), 'localhost');
+ });
- it('returns the value of host when host is a string', () => {
- const host = "1.1.1.1"
- const options = { host };
- assert.equal(hostOptions(options.host), host);
- });
+ it('returns the value of host when host is a string', () => {
+ const host = '1.1.1.1';
+ const options = { host };
+ assert.equal(hostOptions(options.host), host);
+ });
});