Changeset 96c714f in Klonkt for test/push.test.js
- Timestamp:
- 07/22/2026 07:12:11 AM (7 weeks ago)
- Branches:
- main
- Children:
- 9a00f28
- Parents:
- 8240e80
- git-author:
- Robin <roboburr@…> (07/22/2026 07:11:54 AM)
- git-committer:
- Robin <roboburr@…> (07/22/2026 07:12:11 AM)
- File:
-
- 1 edited
-
test/push.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/push.test.js
r8240e80 r96c714f 65 65 }); 66 66 67 test('burst throttle: one ping per window per (user,type); test type never throttles', () => { 68 assert.equal(Push.throttled('tu1', 'like', 1000), false); // first passes 69 assert.equal(Push.throttled('tu1', 'like', 1100), true); // within 300s window 70 assert.equal(Push.throttled('tu1', 'like', 1301), false); // window elapsed 71 assert.equal(Push.throttled('tu1', 'boost', 1000), false); // other type independent 72 assert.equal(Push.throttled('tu2', 'like', 1000), false); // other user independent 73 assert.equal(Push.throttled('tu1', 'test', 1000), false); // test bypasses 74 assert.equal(Push.throttled('tu1', 'test', 1001), false); 75 }); 76 67 77 test('incomplete subscription payloads are refused', () => { 68 78 assert.equal(Push.saveSubscription({ endpoint: '', userId: 'u1', p256dh: 'x', auth: 'y' }), false);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)