mirror of
https://github.com/stablyai/orca.git
synced 2026-10-04 00:02:21 +00:00
* feat(desktop): integrate native mobile push delivery and lifecycle * fix(desktop): preserve notification replay policy and review invariants * fix(desktop): correct notification locale namespace and auto-ack tests
14 lines
676 B
TypeScript
14 lines
676 B
TypeScript
import { expect, it } from 'vitest'
|
|
import { cleanCloudServiceOrigin } from './cloud-service-url'
|
|
it.each(['ftp://localhost', 'file://localhost', 'ws://localhost', 'http://example.com'])(
|
|
'rejects %s even with the development loopback exception',
|
|
(url) => {
|
|
expect(cleanCloudServiceOrigin(url, true)).toBeNull()
|
|
}
|
|
)
|
|
it('allows HTTP only for explicitly enabled loopback development', () => {
|
|
expect(cleanCloudServiceOrigin('http://localhost:8080', true)).toBe('http://localhost:8080')
|
|
expect(cleanCloudServiceOrigin('http://localhost:8080', false)).toBeNull()
|
|
expect(cleanCloudServiceOrigin('https://push.onorca.dev', false)).toBe('https://push.onorca.dev')
|
|
})
|