Skip to content

Commit

Permalink
chore: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zimme committed Dec 13, 2017
1 parent 451ec71 commit 96f9ce0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cli-test/tests/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`file contents: prettier-eslint cli-test/fixtures/example*.js --write --no-eslint-ignore 1`] = `
exports[`file contents: prettier-eslint cli-test/fixtures/example*.js --write --no-eslint-ignore --no-prettier-ignore 1`] = `
Object {
"example1Result": "const { example1 } = baz.bar;
",
Expand All @@ -16,7 +16,7 @@ exports[`stdout: --version 1`] = `
"
`;

exports[`stdout: prettier-eslint cli-test/fixtures/example*.js --write --no-eslint-ignore 1`] = `
exports[`stdout: prettier-eslint cli-test/fixtures/example*.js --write --no-eslint-ignore --no-prettier-ignore 1`] = `
"success formatting 2 files with prettier-eslint
"
`;
7 changes: 4 additions & 3 deletions cli-test/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test("formats files and outputs to stdout", async () => {
// can't just do the testOutput function here because
// the output is in an undeterministic order
const stdout = await runPrettierESLintCLI(
"cli-test/fixtures/stdout*.js --no-eslint-ignore"
"cli-test/fixtures/stdout*.js --no-eslint-ignore --no-prettier-ignore"
);
expect(stdout).toContain(
stripIndent(
Expand Down Expand Up @@ -75,7 +75,7 @@ test("list different files with the --list-different option", async () => {
// can't just do the testOutput function here because
// the output is in an undeterministic order
const stdout = await runPrettierESLintCLI(
"cli-test/fixtures/stdout*.js --list-different --no-eslint-ignore"
"cli-test/fixtures/stdout*.js --list-different --no-eslint-ignore --no-prettier-ignore"
);
expect(stdout).toContain("cli-test/fixtures/stdout1.js");
expect(stdout).toContain("cli-test/fixtures/stdout2.js");
Expand All @@ -87,7 +87,8 @@ test("accepts stdin of code", async () => {
expect(stdout).toEqual("console.log(window.baz, typeof []);\n");
});

const writeCommand = "cli-test/fixtures/example*.js --write --no-eslint-ignore";
const writeCommand =
"cli-test/fixtures/example*.js --write --no-eslint-ignore --no-prettier-ignore";

test(`prettier-eslint ${writeCommand}`, async () => {
// because we're using --write,
Expand Down

0 comments on commit 96f9ce0

Please sign in to comment.