Skip to content

Commit

Permalink
[prettierx] quick CI tests_integration workaround
Browse files Browse the repository at this point in the history
based on: prettier/prettier#7980 by @thorn0

the updates from this CI workaround are expected to be overwritten by
a future merge of Prettier post-2.0.4 from prettier/prettier master

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Co-authored-by: Christopher J. Brody <chris.brody+brodybits@gmail.com>
  • Loading branch information
brodybits and thorn0 committed Apr 13, 2020
1 parent 814d845 commit ce8a904
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions tests_integration/__tests__/check.js
Expand Up @@ -27,9 +27,8 @@ describe("--checks works in CI just as in a non-TTY mode", () => {
"cli/write",
["--check", "formatted.js", "unformatted.js"],
{
env: {
CI: "true"
},
// [prettierx] quick CI workaround:
test_ci: true,
stdoutIsTTY: true
}
).test({
Expand Down
5 changes: 2 additions & 3 deletions tests_integration/__tests__/list-different.js
Expand Up @@ -27,9 +27,8 @@ describe("--list-different works in CI just as in a non-TTY mode", () => {
"cli/write",
["--list-different", "formatted.js", "unformatted.js"],
{
env: {
CI: "true"
},
// [prettierx] quick CI workaround:
test_ci: true,
stdoutIsTTY: true
}
).test({
Expand Down
3 changes: 2 additions & 1 deletion tests_integration/runPrettier.js
Expand Up @@ -88,7 +88,8 @@ function runPrettier(dir, args, options) {
.mockImplementation(() => SynchronousPromise.resolve(options.input || ""));
jest
.spyOn(require(thirdParty), "isCI")
.mockImplementation(() => process.env.CI);
// [prettierx] quick CI workaround:
.mockImplementation(() => !!options.test_ci);
jest
.spyOn(require(thirdParty), "cosmiconfig")
.mockImplementation((moduleName, options) =>
Expand Down

0 comments on commit ce8a904

Please sign in to comment.