test: Copilot generated new simpler test cases

This commit is contained in:
rugk
2026-03-01 16:30:07 +00:00
parent b11541a8e4
commit 47aa7aae36
2 changed files with 30 additions and 0 deletions
+14
View File
@@ -22,6 +22,20 @@ describe('PasteStatus', function () {
describe('createPasteNotification', function () {
this.timeout(30000);
it('creates a notification after a successful document upload', function () {
const clean = jsdom();
$('body').html('<a href="#" id="deletelink"><span></span></a><div id="pastelink"></div>');
PrivateBin.PasteStatus.init();
const expected1 = 'https://example.com/long';
const expected2 = 'https://example.com/short';
PrivateBin.PasteStatus.createPasteNotification(expected1, expected2);
const result1 = $('#pasteurl')[0].href,
result2 = $('#deletelink')[0].href;
clean();
assert.strictEqual(result1, expected1);
assert.strictEqual(result2, expected2);
});
jsc.property(
'creates a notification after a successful document upload',
common.jscUrl(),