Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6095312
rtTestWrapper.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
825 B
Referenced Files
None
Subscribers
None
rtTestWrapper.js
View Options
'use strict'
;
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
/* This is a wrapper around the roundtrip testing script */
const
rtTest
=
require
(
'../../bin/roundtrip-test.js'
);
const
yaml
=
require
(
'js-yaml'
);
// Read ids from a file and return the first line of the file
function
getTestRunId
(
opts
)
{
const
testRunIdFile
=
opts
.
testRunIdFile
||
path
.
resolve
(
__dirname
,
'parsoid.rt-test.ids'
);
return
fs
.
readFileSync
(
testRunIdFile
,
'utf-8'
).
split
(
'\n'
)[
0
];
}
function
runRoundTripTest
(
config
,
test
)
{
return
rtTest
.
runTests
(
test
.
title
,
{
prefix
:
test
.
prefix
,
parsoidURLOpts
:
config
.
parsoidPHP
,
},
rtTest
.
xmlFormat
).
then
(
function
(
result
)
{
return
result
.
output
;
});
}
if
(
typeof
module
===
'object'
)
{
module
.
exports
.
runRoundTripTest
=
runRoundTripTest
;
module
.
exports
.
getTestRunId
=
getTestRunId
;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 6 2026, 02:48 (7 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
08/28/bfae49ee0580b3eeaf28469469d1
Default Alt Text
rtTestWrapper.js (825 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment