@@ -8,23 +8,6 @@ import test from 'node:test'
88import { unified } from 'unified'
99import { simpleCompiler , simpleParser } from './util/simple.js'
1010
11-
12- // `this` in JS is buggy in TS.
13- /**
14- * @type {Plugin<[], string, Node> }
15- */
16- const parse = function ( ) {
17- this . parser = simpleParser
18- }
19-
20- // `this` in JS is buggy in TS.
21- /**
22- * @type {Plugin<[], Node, string> }
23- */
24- const compile = function ( ) {
25- this . compiler = simpleCompiler
26- }
27-
2811test ( '`processSync`' , async function ( t ) {
2912 await t . test ( 'should throw w/o `parser`' , async function ( ) {
3013 assert . throws ( function ( ) {
@@ -80,3 +63,19 @@ test('`processSync`', async function (t) {
8063 }
8164 )
8265} )
66+
67+ // `this` in JS is buggy in TS.
68+ /**
69+ * @type {Plugin<[], string, Node> }
70+ */
71+ function parse ( ) {
72+ this . parser = simpleParser
73+ }
74+
75+ // `this` in JS is buggy in TS.
76+ /**
77+ * @type {Plugin<[], Node, string> }
78+ */
79+ function compile ( ) {
80+ this . compiler = simpleCompiler
81+ }
0 commit comments