Skip to content

Commit c5c9d65

Browse files
kriszypclaude
andcommitted
fix(unitTests/apiTests): lint and format corrections
Add missing baseUrl import to mqtt-test.mjs, remove spurious setupTestApp import from ws-json-work.mjs, apply prettier reformats. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f82e8e6 commit c5c9d65

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

unitTests/apiTests/basicREST-test.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ describe('test REST calls', () => {
245245
// default
246246
});
247247
it('do query by numeric computed index and return computed property', async () => {
248-
let response = await axios(
249-
`${baseUrl}/FourProp/?ageInMonths=288&select(id,age,ageInMonths,nameTitle)`
250-
);
248+
let response = await axios(`${baseUrl}/FourProp/?ageInMonths=288&select(id,age,ageInMonths,nameTitle)`);
251249
assert.equal(response.status, 200);
252250
assert.equal(response.data.length, 1);
253251
assert.equal(response.data[0].age, 24);
@@ -305,9 +303,7 @@ describe('test REST calls', () => {
305303
assert.equal(response.data[1].birthday.slice(0, 4), '1994');
306304
});
307305
it('query by typed epoch date', async () => {
308-
let response = await axios(
309-
`${baseUrl}/FourProp?birthday=gt=date:727660800000&birthday=lt=date:1994-11-22`
310-
);
306+
let response = await axios(`${baseUrl}/FourProp?birthday=gt=date:727660800000&birthday=lt=date:1994-11-22`);
311307
assert.equal(response.status, 200);
312308
assert.equal(response.data.length, 2);
313309
assert.equal(response.data[0].birthday.slice(0, 4), '1993');

unitTests/apiTests/mqtt-test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import assert from 'node:assert/strict';
66
import { once } from 'node:events';
77
import { decode } from 'cbor-x';
88
import { callOperation } from './utility.js';
9-
import { setupTestApp, wsBaseUrl, mqttUrl, mqttsUrl, testHost } from './setupTestApp.mjs';
9+
import { setupTestApp, baseUrl, wsBaseUrl, mqttUrl, mqttsUrl, testHost } from './setupTestApp.mjs';
1010
import environmentManager from '#src/utility/environment/environmentManager';
1111
const { get: env_get, setProperty } = environmentManager;
1212
import { connect, connectAsync } from 'mqtt';

unitTests/apiTests/ws-json-work.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import axios from 'axios';
44
import { decode, encode } from 'cbor-x';
55
import { getVariables } from './utility.js';
66
import { WebSocket } from 'ws';
7-
import { setupTestApp, baseUrl, wsBaseUrl } from './setupTestApp.mjs';
7+
import { baseUrl, wsBaseUrl } from './setupTestApp.mjs';
88
const { authorization } = getVariables();
99

1010
describe('test WebSocket connections', () => {

0 commit comments

Comments
 (0)