Skip to content

Commit f6223bd

Browse files
committed
standalone tests
1 parent 5c698b5 commit f6223bd

3 files changed

Lines changed: 4 additions & 67 deletions

File tree

tests/config/get-prettier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function getPrettierInternal() {
22
const entry = process.env.TEST_STANDALONE
3-
? new URL("./require-standalone.cjs", import.meta.url)
3+
? "prettier/standalone"
44
: "prettier";
55

66
return import(entry).then((module) => module.default);

tests/config/require-standalone.cjs

Lines changed: 0 additions & 64 deletions
This file was deleted.

tests/config/run-format-test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import consistentEndOfLine from "./utils/consistent-end-of-line.js";
1010
import createSnapshot from "./utils/create-snapshot.js";
1111
import stringifyOptionsForTitle from "./utils/stringify-options-for-title.js";
1212
import visualizeEndOfLine from "./utils/visualize-end-of-line.js";
13+
import standalone from "../../dist/standalone.js";
1314

1415
const { __dirname } = createEsmUtils(import.meta);
1516

@@ -190,8 +191,8 @@ function runFormatTest(fixtures, parsers, options) {
190191
describe(title, () => {
191192
const formatOptions = {
192193
plugins: TEST_STANDALONE
193-
? []
194-
: [path.join(__dirname, "../../src/index.js")],
194+
? [standalone]
195+
: [path.join(__dirname, "../../src/index.ts")],
195196
printWidth: 80,
196197
...options,
197198
filepath: filename,

0 commit comments

Comments
 (0)