Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7411885
ve.dm.Annotation.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
865 B
Referenced Files
None
Subscribers
None
ve.dm.Annotation.test.js
View Options
/*!
* VisualEditor DataModel Annotation tests.
*
* @copyright See AUTHORS.txt
*/
QUnit
.
module
(
've.dm.Annotation'
);
QUnit
.
test
(
'getHashObject'
,
(
assert
)
=>
{
const
cases
=
[
{
msg
:
'Bold'
,
annotation
:
new
ve
.
dm
.
BoldAnnotation
(
{
type
:
'textStyle/bold'
,
attributes
:
{
nodeName
:
'b'
}
}
),
expected
:
{
type
:
'textStyle/bold'
,
attributes
:
{
nodeName
:
'b'
}
}
},
{
msg
:
'Italic with original DOM elements'
,
annotation
:
new
ve
.
dm
.
ItalicAnnotation
(
{
type
:
'textStyle/italic'
,
attributes
:
{
nodeName
:
'i'
},
originalDomElementsHash
:
1
}
),
expected
:
{
type
:
'textStyle/italic'
,
attributes
:
{
nodeName
:
'i'
},
originalDomElementsHash
:
1
}
}
];
cases
.
forEach
(
(
caseItem
)
=>
{
assert
.
deepEqual
(
caseItem
.
annotation
.
getHashObject
(),
caseItem
.
expected
,
caseItem
.
msg
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 21, 23:58 (1 d, 12 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7a/37/21be74a8149b458f22452f9f974d
Default Alt Text
ve.dm.Annotation.test.js (865 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment