Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: correct mkdirp import, fix full relative import in tests, fix prettier usage #614

Merged
merged 5 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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