Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Nov 27, 2024
1 parent 1206317 commit 3fad07a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/markdownlint-cli2-test-exec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import fs from "node:fs/promises";
import path from "node:path";
import test from "ava";
import spawn from "nano-spawn";
import testCases from "./markdownlint-cli2-test-cases.mjs";
import { __dirname } from "./esm-helpers.mjs";

Expand All @@ -11,7 +12,6 @@ const repositoryPath = (name) => path.join(__dirname(import.meta), "..", name);

const invoke = (directory, args, noRequire, env, script) => async () => {
await fs.access(directory);
const { "default": spawn } = await import("nano-spawn");
return spawn(
"node",
[
Expand Down Expand Up @@ -41,9 +41,8 @@ testCases({
"includeAbsolute": true
});

const invokeStdin = async (args, stdin, cwd) => {
const { "default": spawn } = await import("nano-spawn");
return spawn(
const invokeStdin = (args, stdin, cwd) => (
spawn(
"node",
[
repositoryPath("markdownlint-cli2-bin.mjs"),
Expand All @@ -53,8 +52,8 @@ const invokeStdin = async (args, stdin, cwd) => {
cwd,
"stdin": { "string": stdin }
}
);
};
)
);

const validInput = "# Heading\n\nText\n";
const invalidInput = "# Heading\n\nText";
Expand Down

0 comments on commit 3fad07a

Please sign in to comment.