Skip to content

Commit

Permalink
chore(td-utils): run prettier
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Eroglu <[email protected]>
  • Loading branch information
hasanheroglu committed Jul 4, 2024
1 parent 9cae364 commit 5ef5551
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion node/td-utils/test/examples/httpAndMqtt.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
"port": 1234
}
]
}
}
2 changes: 1 addition & 1 deletion node/td-utils/test/examples/noProtocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"actions": {},
"events": {},
"protocolSchemes": []
}
}
2 changes: 1 addition & 1 deletion node/td-utils/test/examples/onlyHttp.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"port": 4214
}
]
}
}
2 changes: 1 addition & 1 deletion node/td-utils/test/examples/onlyMqtt.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"hostname": "mylamp.example.com"
}
]
}
}
2 changes: 1 addition & 1 deletion node/td-utils/test/examples/secureProtocols.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
"hostname": "mylamp.example.com"
}
]
}
}
34 changes: 17 additions & 17 deletions node/td-utils/test/protocol-detection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,35 @@
* SPDX-License-Identifier: EPL-2.0 OR W3C-20150513
*/
import { detectProtocolSchemes, ProtocolScheme } from "../src/detectProtocolSchemes";
import { ThingDescription } from 'wot-thing-description-types';
import httpAndMqtt from './examples/httpAndMqtt.json';
import noProtocol from './examples/noProtocol.json';
import onlyHttp from './examples/onlyHttp.json'
import onlyMqtt from './examples/onlyMqtt.json'
import secureProtocols from './examples/secureProtocols.json'
import { ThingDescription } from "wot-thing-description-types";
import httpAndMqtt from "./examples/httpAndMqtt.json";
import noProtocol from "./examples/noProtocol.json";
import onlyHttp from "./examples/onlyHttp.json";
import onlyMqtt from "./examples/onlyMqtt.json";
import secureProtocols from "./examples/secureProtocols.json";

export type ThingDescriptionTest = ThingDescription & { protocolSchemes: ProtocolScheme[] };

describe("test examples", () => {
it("should test httpAndMqtt", () => {
testTD(httpAndMqtt)
})
testTD(httpAndMqtt);
});

it("should test noProtocol", () => {
testTD(noProtocol)
})
testTD(noProtocol);
});

it("should test onlyHttp", () => {
testTD(onlyHttp)
})
testTD(onlyHttp);
});

it("should test onlyMqtt", () => {
testTD(onlyMqtt)
})
testTD(onlyMqtt);
});

it("should test secureProtocols", () => {
testTD(secureProtocols)
})
testTD(secureProtocols);
});
});

const testTD = (td: any) => {
Expand All @@ -51,4 +51,4 @@ const testTD = (td: any) => {
td.protocolSchemes.forEach((s: ProtocolScheme) => {
expect(detectedProtocolSchemes).toContainEqual(s);
});
};
};

0 comments on commit 5ef5551

Please sign in to comment.