File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
packages/display-js/src/lib Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export function isObjectId(value) {
70
70
* @return {boolean }
71
71
*/
72
72
export function isHubstairsUrl ( url ) {
73
- return / ^ ( h t t p s ? : ) ? \/ \/ d i s p l a y .* ( h u b s t a i r s \. c o m | n f i n i t e \. a p p ) ( : \d + ) ? (? = $ | \/ ) / . test ( url )
73
+ return / ^ ( h t t p s ? : ) ? \/ \/ d i s p l a y .* ( h u b s t a i r s \. i o | h u b s t a i r s \. c o m | n f i n i t e \. a p p ) ( : \d + ) ? (? = $ | \/ ) / . test ( url )
74
74
}
75
75
76
76
/**
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ describe('isObjectId', () => {
53
53
54
54
describe ( 'isHubstairsUrl' , ( ) => {
55
55
test ( 'identifies right Hubstairs urls only' , ( ) => {
56
+ expect ( isHubstairsUrl ( 'http://display.hubstairs.io' ) ) . toBe ( true )
57
+ expect ( isHubstairsUrl ( 'http://display.hubstairs.tld' ) ) . toBe ( false )
56
58
expect ( isHubstairsUrl ( 'http://display.nfinite.app' ) ) . toBe ( true )
57
59
expect ( isHubstairsUrl ( 'http://display.hubstairs.com' ) ) . toBe ( true )
58
60
expect ( isHubstairsUrl ( 'https://display.hubstairs.com' ) ) . toBe ( true )
You can’t perform that action at this time.
0 commit comments