Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YingXue committed Jan 16, 2025
1 parent 703547c commit 047e681
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/server/dataPlaneHelper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as express from 'express';
import { generateDataPlaneRequestBody, processDataPlaneResponse } from './dataPlaneHelper';

describe('server', () => {
const hostName = 'testHub.private.azure-devices-int.net';
const hostName = 'testHub.private.azure-devices.net';
it('generates data plane request with API version and query string specified in body', () => {
const queryString = 'connectTimeoutInSeconds=20&responseTimeoutInSeconds=20';
const req = {
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('server', () => {
});

it('generates data plane response with no httpResponse', async () => {
const response = await processDataPlaneResponse(null);
const response = await processDataPlaneResponse(null as any);
expect(response.body).toEqual({body: {Message: 'Failed to get any response from iot hub service.'}});
});

Expand Down
2 changes: 1 addition & 1 deletion src/server/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const fetchDrivesOnWindows = (res: express.Response) => {

export const fetchDirectories = (dir: string, res: express.Response) => {
const result: string[] = [];
const resolvedPath = fs.realpathSync(dir, { encoding: "utf8" });
const resolvedPath = fs.realpathSync(dir, { encoding: "utf8" });

for (const item of fs.readdirSync(resolvedPath)) {
try {
Expand Down

0 comments on commit 047e681

Please sign in to comment.