@@ -28,14 +28,16 @@ test('retext-readability', async function (t) {
28
28
ancestors : [ ] ,
29
29
column : 1 ,
30
30
fatal : false ,
31
- message : 'Hard to read sentence (confidence: 4/7)' ,
31
+ message :
32
+ 'Unexpected hard to read sentence, according to 4 out of 7 algorithms' ,
32
33
line : 1 ,
33
34
name : '1:1-3:32' ,
34
35
place : {
35
36
start : { line : 1 , column : 1 , offset : 0 } ,
36
37
end : { line : 3 , column : 32 , offset : 132 }
37
38
} ,
38
- reason : 'Hard to read sentence (confidence: 4/7)' ,
39
+ reason :
40
+ 'Unexpected hard to read sentence, according to 4 out of 7 algorithms' ,
39
41
ruleId : 'readability' ,
40
42
source : 'retext-readability' ,
41
43
actual :
@@ -72,7 +74,7 @@ test('retext-readability', async function (t) {
72
74
)
73
75
74
76
assert . deepEqual ( file . messages . map ( String ) , [
75
- '1:1-3:32: Hard to read sentence (confidence: 4/7) '
77
+ '1:1-3:32: Unexpected hard to read sentence, according to 4 out of 7 algorithms '
76
78
] )
77
79
}
78
80
)
@@ -125,7 +127,7 @@ test('retext-readability', async function (t) {
125
127
)
126
128
127
129
assert . deepEqual ( file . messages . map ( String ) , [
128
- '1:1-3:32: Hard to read sentence (confidence: 5/7) '
130
+ '1:1-3:32: Unexpected hard to read sentence, according to 5 out of 7 algorithms '
129
131
] )
130
132
}
131
133
)
@@ -145,7 +147,7 @@ test('retext-readability', async function (t) {
145
147
)
146
148
147
149
assert . deepEqual ( file . messages . map ( String ) , [
148
- '1:1-3:46: Hard to read sentence (confidence: 5/7) '
150
+ '1:1-3:46: Unexpected hard to read sentence, according to 5 out of 7 algorithms '
149
151
] )
150
152
}
151
153
)
@@ -154,7 +156,7 @@ test('retext-readability', async function (t) {
154
156
'should warn when highly confident that a sentence is hard to read' ,
155
157
async function ( ) {
156
158
const file = await retext ( )
157
- . use ( retextReadability , { age : 14 } )
159
+ . use ( retextReadability , { age : 6 } )
158
160
. process (
159
161
[
160
162
'Oberon, also designated Uranus IV, is the outermost ' ,
@@ -166,7 +168,7 @@ test('retext-readability', async function (t) {
166
168
)
167
169
168
170
assert . deepEqual ( file . messages . map ( String ) , [
169
- '1:1-4:45: Hard to read sentence (confidence: 6/7) '
171
+ '1:1-4:45: Unexpected hard to read sentence, according to all 7 algorithms '
170
172
] )
171
173
}
172
174
)
@@ -185,7 +187,7 @@ test('retext-readability', async function (t) {
185
187
. process ( 'Honorificabilitudinitatibus.' )
186
188
187
189
assert . deepEqual ( file . messages . map ( String ) , [
188
- '1:1-1:29: Hard to read sentence (confidence: 4/7) '
190
+ '1:1-1:29: Unexpected hard to read sentence, according to 4 out of 7 algorithms '
189
191
] )
190
192
} )
191
193
} )
0 commit comments