Feature 19: Notifications - Web Push and Google Chat (#169)
CI / ci (push) Successful in 8m31s
CI / ci (push) Successful in 8m31s
Co-authored-by: orchestrator-agent <20+orchestrator-agent@code.cubecraftcreations.com>
This commit was merged in pull request #169.
This commit is contained in:
@@ -44,3 +44,13 @@ describe('service worker source', () => {
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('service worker push listeners source', () => {
|
||||
it('delegates push and notificationclick to src/push/notification.ts', () => {
|
||||
expect(source).toContain("import { openNotification, showPush } from './push/notification'")
|
||||
expect(source).toMatch(/self\.addEventListener\('push', \(event\) => \{\s*event\.waitUntil\(\s*showPush\(event\.data\?\.text\(\) \?\? null, self\.registration, self\.location\.origin,/)
|
||||
expect(source).toMatch(
|
||||
/self\.addEventListener\('notificationclick', \(event\) => \{\s*event\.notification\.close\(\)\s*event\.waitUntil\(openNotification\(event\.notification\.data, self\.clients, self\.location\.origin\)\)/,
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user