1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 12:30:11 +02:00
Files
slate/packages/slate-hyperscript/test/fixtures/cursor-across-blocks-and-inlines.js
Jinxuan Zhu 58c644323f Add coverage test with mocha and codecov (#2037)
* Run mocha test with module alias

* Running test with babel module alias

* Fix model alias

* Fix model alias

* Resolve module alias

* Running test with babel module alias

* Connect to codecov

* add codecov to travis

* stop if yarn test has errors

* Still cannot collect data from slate modules

* Try to check whether it works with codecov

* Move config to nycrc

* Remove nyc require

* Update nyc to use src

* better before_script
2018-08-06 10:31:42 -07:00

157 lines
3.0 KiB
JavaScript

/** @jsx h */
import h from 'slate-hyperscript'
export const input = (
<value>
<document>
<block type="paragraph">
<inline type="link">
on<anchor />e
</inline>
</block>
<block type="paragraph">
<inline type="link">
t<focus />wo
</inline>
</block>
</document>
</value>
)
export const options = {
preserveSelection: true,
preserveKeys: true,
}
export const output = {
object: 'value',
document: {
object: 'document',
key: '10',
data: {},
nodes: [
{
object: 'block',
key: '3',
type: 'paragraph',
isVoid: false,
data: {},
nodes: [
{
object: 'text',
key: '11',
leaves: [
{
object: 'leaf',
text: '',
marks: [],
},
],
},
{
object: 'inline',
key: '1',
type: 'link',
isVoid: false,
data: {},
nodes: [
{
object: 'text',
key: '0',
leaves: [
{
object: 'leaf',
text: 'one',
marks: [],
},
],
},
],
},
{
object: 'text',
key: '12',
leaves: [
{
object: 'leaf',
text: '',
marks: [],
},
],
},
],
},
{
object: 'block',
key: '7',
type: 'paragraph',
isVoid: false,
data: {},
nodes: [
{
object: 'text',
key: '13',
leaves: [
{
object: 'leaf',
text: '',
marks: [],
},
],
},
{
object: 'inline',
key: '5',
type: 'link',
isVoid: false,
data: {},
nodes: [
{
object: 'text',
key: '4',
leaves: [
{
object: 'leaf',
text: 'two',
marks: [],
},
],
},
],
},
{
object: 'text',
key: '14',
leaves: [
{
object: 'leaf',
text: '',
marks: [],
},
],
},
],
},
],
},
selection: {
object: 'range',
anchor: {
object: 'point',
key: '0',
path: [0, 1, 0],
offset: 2,
},
focus: {
object: 'point',
key: '4',
path: [1, 1, 0],
offset: 1,
},
isFocused: true,
isAtomic: false,
marks: null,
},
}