Skip to content

Commit f0b2067

Browse files
committed
Remove duplicate test
Closes GH-35.
1 parent 86a5e9b commit f0b2067

File tree

1 file changed

+9
-42
lines changed

1 file changed

+9
-42
lines changed

test.js

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -399,31 +399,6 @@ test('rehypeHighlight', async function (t) {
399399
)
400400
})
401401

402-
await t.test('should reprocess exact', async function () {
403-
const file = await unified()
404-
.use(rehypeParse, {fragment: true})
405-
.use(rehypeHighlight)
406-
.use(rehypeStringify)
407-
.process(
408-
[
409-
'<h1>Hello World!</h1>',
410-
'',
411-
'<pre><code class="hljs lang-js"><span class="hljs-keyword">var</span> name = <span class="hljs-string">"World"</span>;',
412-
'<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Hello, "</span> + name + <span class="hljs-string">"!"</span>)</code></pre>'
413-
].join('\n')
414-
)
415-
416-
assert.equal(
417-
String(file),
418-
[
419-
'<h1>Hello World!</h1>',
420-
'',
421-
'<pre><code class="hljs lang-js"><span class="hljs-keyword">var</span> name = <span class="hljs-string">"World"</span>;',
422-
'<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"Hello, "</span> + name + <span class="hljs-string">"!"</span>)</code></pre>'
423-
].join('\n')
424-
)
425-
})
426-
427402
await t.test('should parse custom language', async function () {
428403
const file = await unified()
429404
.use(rehypeParse, {fragment: true})
@@ -440,28 +415,20 @@ test('rehypeHighlight', async function (t) {
440415
})
441416

442417
await t.test('should reprocess exact', async function () {
418+
const expected = [
419+
'<h1>Hello World!</h1>',
420+
'',
421+
'<pre><code class="hljs lang-js"><span class="hljs-keyword">var</span> name = <span class="hljs-string">"World"</span>;',
422+
'<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"Hello, "</span> + name + <span class="hljs-string">"!"</span>)</code></pre>'
423+
].join('\n')
424+
443425
const file = await unified()
444426
.use(rehypeParse, {fragment: true})
445427
.use(rehypeHighlight)
446428
.use(rehypeStringify)
447-
.process(
448-
[
449-
'<h1>Hello World!</h1>',
450-
'',
451-
'<pre><code class="hljs lang-js"><span class="hljs-keyword">var</span> name = <span class="hljs-string">"World"</span>;',
452-
'<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"Hello, "</span> + name + <span class="hljs-string">"!"</span>)</code></pre>'
453-
].join('\n')
454-
)
429+
.process(expected)
455430

456-
assert.equal(
457-
String(file),
458-
[
459-
'<h1>Hello World!</h1>',
460-
'',
461-
'<pre><code class="hljs lang-js"><span class="hljs-keyword">var</span> name = <span class="hljs-string">"World"</span>;',
462-
'<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"Hello, "</span> + name + <span class="hljs-string">"!"</span>)</code></pre>'
463-
].join('\n')
464-
)
431+
assert.equal(String(file), expected)
465432
})
466433

467434
await t.test('should ignore comments', async function () {

0 commit comments

Comments
 (0)