Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4117916
Backlinks.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
936 B
Referenced Files
None
Subscribers
None
Backlinks.js
View Options
'use strict'
;
const
{
action
,
assert
,
utils
}
=
require
(
'api-testing'
);
describe
(
'Backlinks'
,
()
=>
{
const
randomPage
=
utils
.
title
(
'Esther'
);
const
linksToEsther1
=
utils
.
title
(
'LinksToEsther1'
);
const
linksToEsther2
=
utils
.
title
(
'LinksToEsther2'
);
let
bob
;
before
(
async
()
=>
{
bob
=
await
action
.
bob
();
const
randomPageText
=
`I'm guessing you came here from
${
linksToEsther1
}
or
${
linksToEsther2
}
.`
;
const
text
=
`All I do is link to [[
${
randomPage
}
|Page]]`
;
await
bob
.
edit
(
linksToEsther1
,
{
text
}
);
await
bob
.
edit
(
linksToEsther2
,
{
text
}
);
await
bob
.
edit
(
randomPage
,
{
text
:
randomPageText
}
);
}
);
describe
(
'referrers'
,
()
=>
{
it
(
'can be listed'
,
async
()
=>
{
const
result
=
await
bob
.
list
(
'backlinks'
,
{
bltitle
:
randomPage
}
);
const
links
=
result
.
map
(
(
p
)
=>
p
.
title
);
assert
.
sameMembers
(
links
,
[
linksToEsther1
,
linksToEsther2
]
);
}
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 02:25 (2 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bc/98/3ee3e5e2a9003805539d426da4f0
Default Alt Text
Backlinks.js (936 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment