* Sync README -> docs/options.md * Sync README -> docs/*.md * Misc fixups * Remove markdown-toc * Remove insert-pragma from ToC * Never again! * Move all docs to ./docs * Remove yarn toc * Fix inter-doc links * Fix links in footer * Clean up README.md * Add basic description to README.md * Use flat badges * Move editor guides to website * Improve prettier-ignore docs * Fixup bad find/replace * Add JSON to README * Fix custom parser API link * Fixup GitHub centering, add downloads badge * Add 1.8 docs * docs(website): mention markdown on homepage (#1) * Add intro * Add watching-files.md * Fix markdown syntax highlighting * Switch back to .md links
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
"use strict";
|
|
|
|
const runPrettier = require("../runPrettier");
|
|
|
|
expect.addSnapshotSerializer(require("../path-serializer"));
|
|
|
|
describe("ignores node_modules by default", () => {
|
|
runPrettier("cli/with-node-modules", ["**/*.js", "-l"]).test({
|
|
status: 1
|
|
});
|
|
});
|
|
|
|
describe("ignores node_modules by with ./**/*.js", () => {
|
|
runPrettier("cli/with-node-modules", ["./**/*.js", "-l"]).test({
|
|
status: 1
|
|
});
|
|
});
|
|
|
|
describe("doesn't ignore node_modules with --with-node-modules flag", () => {
|
|
runPrettier("cli/with-node-modules", [
|
|
"**/*.js",
|
|
"-l",
|
|
"--with-node-modules"
|
|
]).test({
|
|
status: 1
|
|
});
|
|
});
|
|
|
|
describe("ignores node_modules by default for file list", () => {
|
|
runPrettier("cli/with-node-modules", [
|
|
"node_modules/node-module.js",
|
|
"not_node_modules/file.js",
|
|
"regular-module.js",
|
|
"-l"
|
|
]).test({
|
|
status: 1
|
|
});
|
|
});
|
|
|
|
describe("doesn't ignore node_modules with --with-node-modules flag for file list", () => {
|
|
runPrettier("cli/with-node-modules", [
|
|
"node_modules/node-module.js",
|
|
"not_node_modules/file.js",
|
|
"regular-module.js",
|
|
"-l",
|
|
"--with-node-modules"
|
|
]).test({
|
|
status: 1
|
|
});
|
|
});
|