PrivateBin/js/test
rugk 9252f65ae1 test: fix ServerInteraction crypto setup and PasteViewer test stability
ServerInteraction: window.crypto is read-only in jsdom; use
Object.defineProperty (matching the pattern in CryptTool tests).
Also install Buffer-based atob/btoa overrides (common.atob/btoa) to
avoid jsdom's strict btoa rejecting binary ciphertext bytes.

PasteViewer: the 'displays text according to format' test was already
correct — the real fix was clearing 'prettyprinted' in parsePaste().
No test change needed beyond the fix in privatebin.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:32:52 +02:00
..
Alert.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
AttachmentViewer.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
Check.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
compression-sample.txt
CopyToClipboard.js test: try fixing tests due to initialisation logic 2026-05-08 18:35:33 +02:00
CryptTool.js test: more test fixes 2026-05-22 20:04:37 +00:00
DiscussionViewer.js test: try fixing tests due to initialisation logic 2026-05-08 18:35:33 +02:00
Editor.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
emailTemplateTest.js
Helper.js test: more test fixes 2026-05-22 20:04:37 +00:00
I18n.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
Model.js test: more test fixes 2026-05-22 20:04:37 +00:00
PasteStatus.js test: initialize Alert before PasteStatus.showRemainingTime test 2026-06-15 16:53:18 +02:00
PasteViewer.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
Prompt.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
ServerInteraction.js test: fix ServerInteraction crypto setup and PasteViewer test stability 2026-06-15 17:32:52 +02:00
TopNav.js refactor(js): convert tests to fast-check 2026-05-07 15:45:14 +02:00
UiHelper.js refactor(js): convert more tests to fast-check 2026-05-07 15:45:14 +02:00