Skip to content

Commit 56cebcf

Browse files
kriszypclaude
andcommitted
fix(test): terminology suite — CSV path dirname, prettier
fileURLToPath(import.meta.url) returns the file, not its directory; path.join on a file path produces a wrong CSV location. Use path.dirname() first so the CSV resolves to integrationTests/apiTests/data/. Also apply prettier formatting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9ec0ab2 commit 56cebcf

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

integrationTests/apiTests/terminology.test.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { createApiClient } from './utils/client.mjs';
1818
import { awaitJobCompleted } from './utils/operations.mjs';
1919

2020
// Resolve the CSV fixture path relative to this file so Harper can read it.
21-
const SUPPLIERS_CSV = path.join(fileURLToPath(import.meta.url), '../../data/Suppliers.csv');
21+
const SUPPLIERS_CSV = path.join(path.dirname(fileURLToPath(import.meta.url)), 'data/Suppliers.csv');
2222

2323
suite('Terminology aliases (database / primary_key)', (ctx) => {
2424
let client;
@@ -78,9 +78,7 @@ suite('Terminology aliases (database / primary_key)', (ctx) => {
7878
await client
7979
.req()
8080
.send({ operation: 'create_attribute', database: 'tuckerdoodle', table: 'todo', attribute: 'date' })
81-
.expect((r) =>
82-
assert.equal(r.body.message, "attribute 'tuckerdoodle.todo.date' successfully created.", r.text)
83-
)
81+
.expect((r) => assert.equal(r.body.message, "attribute 'tuckerdoodle.todo.date' successfully created.", r.text))
8482
.expect(200);
8583
});
8684

@@ -385,9 +383,7 @@ suite('Terminology aliases (database / primary_key)', (ctx) => {
385383
await client
386384
.req()
387385
.send({ operation: 'drop_table', database: 'tuckerdoodle', table: 'todo' })
388-
.expect((r) =>
389-
assert.equal(r.body.message, "successfully deleted table 'tuckerdoodle.todo'", r.text)
390-
)
386+
.expect((r) => assert.equal(r.body.message, "successfully deleted table 'tuckerdoodle.todo'", r.text))
391387
.expect(200);
392388
});
393389

0 commit comments

Comments
 (0)