Skip to content

Commit

Permalink
Simplify, good enough
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Jan 13, 2025
1 parent 3743717 commit 926b3fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions test-js/test-classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ import {
import { VarPackedPath } from "../src/fontra/client/core/var-path.js";
import { readRepoPathAsJSON } from "./test-support.js";

const classesSchema = readRepoPathAsJSON(
"src",
"fontra",
"client",
"core",
"classes.json"
);
const classesSchema = readRepoPathAsJSON("src/fontra/client/core/classes.json");

describe("schema tests", () => {
const testPaths = [
Expand Down
4 changes: 2 additions & 2 deletions test-js/test-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function getTestData(fileName) {
return JSON.parse(fs.readFileSync(path, "utf8"));
}

export function readRepoPathAsJSON(...pathComponents) {
const path = join(dirname(__dirname), ...pathComponents);
export function readRepoPathAsJSON(path) {
path = join(dirname(__dirname), path);
return JSON.parse(fs.readFileSync(path, "utf8"));
}

0 comments on commit 926b3fa

Please sign in to comment.