Skip to content

Commit

Permalink
Fix src being used for readline test
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Mar 4, 2025
1 parent fd9a6f9 commit 6d193a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions tests/common/handle.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import assert from 'node:assert/strict';
import { suite, test } from 'node:test';
import { wait } from 'utilium';
import { Interface as ReadlineInterface } from '../../dist/readline.js';
import { constants, type FileHandle, open } from '../../dist/vfs/promises.js';

const content = 'The cake is a lie',
Expand Down Expand Up @@ -56,13 +55,11 @@ await suite('FileHandle', () => {

await using rl = handle.readLines();

assert.ok(rl instanceof ReadlineInterface, 'Should return a ReadlineInterface instance');

const lines: string[] = [];
rl.on('line', (line: string) => lines.push(line));

await wait(50);

assert.deepEqual(lines, ['first line', 'second line', 'third line'], 'Should read all lines correctly');
assert.deepEqual(lines, ['first line', 'second line', 'third line']);
});
});
2 changes: 1 addition & 1 deletion tests/common/readline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import assert from 'node:assert/strict';
import { PassThrough } from 'node:stream';
import { suite, test } from 'node:test';
import { wait } from 'utilium';
import { createInterface, Interface } from '../../src/readline.js';
import { createInterface, Interface } from '../../dist/readline.js';

suite('Readline interface', { skip: true }, () => {
test('creates interface with readable stream', async () => {
Expand Down

0 comments on commit 6d193a8

Please sign in to comment.