-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(td-utils): change test suite style
Signed-off-by: Hasan Eroglu <[email protected]>
- Loading branch information
1 parent
5ef5551
commit a19787d
Showing
7 changed files
with
82 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,5 @@ | |
"security": ["basic_sc"], | ||
"properties": {}, | ||
"actions": {}, | ||
"events": {}, | ||
"protocolSchemes": [] | ||
"events": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,5 @@ | |
} | ||
] | ||
} | ||
}, | ||
"protocolSchemes": [ | ||
{ | ||
"protocol": "mqtt", | ||
"hostname": "mylamp.example.com" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
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 const testSuite = [ | ||
{ | ||
name: "httpAndMqtt", | ||
input: httpAndMqtt, | ||
expected: [ | ||
{ | ||
protocol: "http", | ||
hostname: "mylamp.example.com", | ||
port: 1234, | ||
}, | ||
{ | ||
protocol: "mqtt", | ||
hostname: "mylamp.example.com", | ||
port: 1234, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "noProtocol", | ||
input: noProtocol, | ||
expected: [], | ||
}, | ||
{ | ||
name: "onlyHttp", | ||
input: onlyHttp, | ||
expected: [ | ||
{ | ||
protocol: "http", | ||
hostname: "mylamp.example.com", | ||
port: 4212, | ||
}, | ||
{ | ||
protocol: "http", | ||
hostname: "mylamp.example.com", | ||
port: 4214, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "onlyMqtt", | ||
input: onlyMqtt, | ||
expected: [ | ||
{ | ||
protocol: "mqtt", | ||
hostname: "mylamp.example.com", | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "secureProtocols", | ||
input: secureProtocols, | ||
expected: [ | ||
{ | ||
protocol: "https", | ||
hostname: "mylamp.example.com", | ||
}, | ||
{ | ||
protocol: "mqtts", | ||
hostname: "mylamp.example.com", | ||
}, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters