Skip to content

Commit

Permalink
build: correct mkdirp import, fix full relative import in tests, fi…
Browse files Browse the repository at this point in the history
…x prettier usage (#614)
  • Loading branch information
wolfy1339 committed Oct 25, 2023
1 parent b82a567 commit c5d8733
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { writeFile } from "fs/promises";
import { fileURLToPath } from "url";

import * as prettier from "prettier";
import mkdirp from "mkdirp";
import { mkdirp } from "mkdirp";

async function write(fixturesPath, fixtures) {
const path = resolve(
Expand All @@ -19,11 +19,13 @@ async function write(fixturesPath, fixtures) {
return Promise.all([
writeFile(
resolve(path, "normalized-fixture.json"),
prettier.format(JSON.stringify(fixtures.normalized), { parser: "json" }),
await prettier.format(JSON.stringify(fixtures.normalized), {
parser: "json",
}),
),
writeFile(
resolve(path, "raw-fixture.json"),
prettier.format(JSON.stringify(fixtures.raw), { parser: "json" }),
await prettier.format(JSON.stringify(fixtures.raw), { parser: "json" }),
),
]);
}
2 changes: 1 addition & 1 deletion test/integration/smoke.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";

import fixtures from "../..";
import fixtures from "../../index.js";
import { readFileSync } from "fs";

test("Accepts fixtures object as argument", async () => {
Expand Down

0 comments on commit c5d8733

Please sign in to comment.