Skip to content

Commit 0bcf63b

Browse files
committed
Fix tests
1 parent 55fc7a8 commit 0bcf63b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/nextjs/test/integration/test/server/tracingHttp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = async ({ url: urlBase, argv }) => {
4141
);
4242

4343
await getAsync(url);
44-
await sleep(1250);
44+
await sleep(250);
4545

4646
assert.ok(capturedRequest.isDone(), 'Did not intercept expected request');
4747
};

packages/node/src/integrations/contextlines.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import { NodeClient } from '../client';
1010
const FILE_CONTENT_CACHE = new LRUMap<string, string | null>(100);
1111
const DEFAULT_LINES_OF_CONTEXT = 7;
1212

13+
function readTextFileAsync(path: string): Promise<string> {
14+
return promisify(readFile)(path, { encoding: 'utf8' });
15+
}
16+
1317
/**
1418
* Resets the file cache. Exists for testing purposes.
1519
* @hidden
@@ -118,7 +122,7 @@ async function readSourceFiles(filenames: Set<string>): Promise<Record<string, s
118122

119123
let content: string | null = null;
120124
try {
121-
content = await promisify(readFile)(filename, { encoding: 'utf8' });
125+
content = await readTextFileAsync(filename);
122126
} catch (_) {
123127
//
124128
}

0 commit comments

Comments
 (0)