Skip to content

Commit 7d07de3

Browse files
committed
fix(sea): F4 e2e — switch fs/path to named imports under ESM reparse
Same ESM-reparse fix as F2's commit `d076067`. Apply named imports `existsSync` from `fs` and `resolve as resolvePath` from `path` so the test runs under mocha's MODULE_TYPELESS_PACKAGE_JSON reparse-as-ESM path. Verified live e2e passes (all 5 cases: 100-row drain, empty-set drain, mixed-type drain, drain-twice, drain-after-close). Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent e905704 commit 7d07de3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/e2e/sea/fetch-all-e2e.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
*/
3434

3535
import { expect } from 'chai';
36-
import * as fs from 'fs';
37-
import * as path from 'path';
36+
import { existsSync } from 'fs';
37+
import { resolve as resolvePath } from 'path';
3838
import { createRequire } from 'module';
3939
import type { ConnectionOptions } from '../../../lib/contracts/IDBSQLClient';
4040

@@ -77,11 +77,11 @@ describe('SEA fetchAll — Array<object> row drain', function suite() {
7777
// attempts to load DBSQLClient (which transitively imports
7878
// SeaNativeLoader's module-level require of the .node). Skip with
7979
// a clear message so a developer sees the actionable instruction.
80-
const nodeArtifact = path.resolve(
80+
const nodeArtifact = resolvePath(
8181
process.cwd(),
8282
'native/sea/index.linux-x64-gnu.node',
8383
);
84-
if (!fs.existsSync(nodeArtifact)) {
84+
if (!existsSync(nodeArtifact)) {
8585
// eslint-disable-next-line no-console
8686
console.warn(
8787
`[sea fetch-all e2e] skipping: native binary not built. ` +

0 commit comments

Comments
 (0)