|
3 | 3 | * @typedef {import('../index.js').Options} Options |
4 | 4 | */ |
5 | 5 |
|
6 | | -import fs from 'fs' |
7 | | -import path from 'path' |
| 6 | +import assert from 'node:assert' |
| 7 | +import fs from 'node:fs' |
| 8 | +import path from 'node:path' |
| 9 | +import process from 'node:process' |
8 | 10 | import test from 'tape' |
9 | 11 | import {remark} from 'remark' |
10 | 12 | import remarkGfm from 'remark-gfm' |
@@ -51,22 +53,24 @@ test('Fixtures', (t) => { |
51 | 53 | const input = read(join(filepath, 'input.md'), 'utf-8') |
52 | 54 | const result = github(input, 'wooorm/remark') |
53 | 55 |
|
54 | | - test('should work on `' + fixture + '`', (t) => { |
| 56 | + t.doesNotThrow(() => { |
55 | 57 | const results = result.split('\n') |
56 | 58 | const outputs = output.split('\n') |
57 | 59 | let index = -1 |
58 | 60 |
|
59 | | - t.equal(results.length, outputs.length, 'should be same length') |
| 61 | + assert.strictEqual( |
| 62 | + results.length, |
| 63 | + outputs.length, |
| 64 | + 'should be same length' |
| 65 | + ) |
60 | 66 |
|
61 | 67 | while (++index < results.length) { |
62 | 68 | const resultLine = results[index] |
63 | 69 | if (resultLine !== '') { |
64 | | - t.equal(resultLine, outputs[index], resultLine) |
| 70 | + assert.strictEqual(resultLine, outputs[index], resultLine) |
65 | 71 | } |
66 | 72 | } |
67 | | - |
68 | | - t.end() |
69 | | - }) |
| 73 | + }, 'should work on `' + fixture + '`') |
70 | 74 | } |
71 | 75 |
|
72 | 76 | t.end() |
|
0 commit comments