Skip to content

Commit 5b4942c

Browse files
committed
Update dev-dependencies
1 parent 4332a69 commit 5b4942c

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"tape": "^5.0.0",
5555
"tinyify": "^3.0.0",
5656
"vfile": "^4.0.0",
57-
"xo": "^0.35.0"
57+
"xo": "^0.38.0"
5858
},
5959
"scripts": {
6060
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",

Diff for: test/index.js

+23-19
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,29 @@ test('hast-util-to-nlcst', function (t) {
167167

168168
test('Fixtures', function (t) {
169169
var root = path.join(__dirname, 'fixtures')
170-
171-
fs.readdirSync(root)
172-
.filter(negate(hidden))
173-
.forEach(function (fixture) {
174-
var input = path.join(root, fixture, 'input.html')
175-
var output = path.join(root, fixture, 'output.json')
176-
var file = vfile(fs.readFileSync(input))
177-
var actual = toNlcst(rehype().parse(file), file, Latin)
178-
var expected
179-
180-
try {
181-
expected = JSON.parse(fs.readFileSync(output))
182-
} catch (_) {
183-
fs.writeFileSync(output, JSON.stringify(actual, null, 2) + '\n')
184-
return
185-
}
186-
187-
t.deepEqual(actual, expected, 'should work on `' + fixture + '`')
188-
})
170+
var files = fs.readdirSync(root).filter(negate(hidden))
171+
var index = -1
172+
var input
173+
var output
174+
var file
175+
var actual
176+
var expected
177+
178+
while (++index < files.length) {
179+
input = path.join(root, files[index], 'input.html')
180+
output = path.join(root, files[index], 'output.json')
181+
file = vfile(fs.readFileSync(input))
182+
actual = toNlcst(rehype().parse(file), file, Latin)
183+
184+
try {
185+
expected = JSON.parse(fs.readFileSync(output))
186+
} catch (_) {
187+
fs.writeFileSync(output, JSON.stringify(actual, null, 2) + '\n')
188+
return
189+
}
190+
191+
t.deepEqual(actual, expected, 'should work on `' + files[index] + '`')
192+
}
189193

190194
t.end()
191195
})

0 commit comments

Comments
 (0)