Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lift requires #3780

Merged
merged 6 commits into from
Jun 10, 2017
Merged

Lift requires #3780

merged 6 commits into from
Jun 10, 2017

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jun 9, 2017

Summary
Move a lot of the changes in #3493 to isolate the changes causing errors.

Test plan
Tests should pass

@SimenB
Copy link
Member Author

SimenB commented Jun 9, 2017

This fails locally for some reason.

 FAIL  packages/jest-repl/src/__tests__/jest-repl-test.js                                                                                                                                                                                [2/2]
  ● Repl › cli › runs without errors

    expect(received).toMatch(expected)

    Expected value to match:
      /›/
    Received:
      ""

      at Object.it (packages/jest-repl/src/__tests__/jest-repl-test.js:28:36)
          at Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:169:7)

  Repl
    cli
      ✕ runs without errors (513ms)

@@ -21,6 +21,7 @@ function getJest(packageRoot: Path) {
/* $FlowFixMe */
return require(binPath);
} else {
// TODO: Because of a dependency cycle, this can only be inlined once the babel plugin for inlining is merged
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should almost be considered a bug, IMO

@SimenB SimenB mentioned this pull request Jun 9, 2017
@@ -91,8 +91,8 @@ class Resolver {

static findNodeModule(path: Path, options: FindNodeModuleConfig): ?Path {
const resolver = options.resolver
/* $FlowFixMe */
? require(options.resolver)
? /* $FlowFixMe */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of this one, /cc @vjeux

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, is this a regression from before?

It indeed looked better before.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it was in a single line before, it was multilined when I made it into a ternary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you open an issue against prettier? We may be able to print it the way you want, we're already doing that for flow unions.

Copy link
Member Author

@SimenB SimenB Jun 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov-io
Copy link

Codecov Report

Merging #3780 into master will decrease coverage by 0.07%.
The diff coverage is 52.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3780      +/-   ##
==========================================
- Coverage   58.09%   58.02%   -0.08%     
==========================================
  Files         191      191              
  Lines        6708     6711       +3     
  Branches        6        6              
==========================================
- Hits         3897     3894       -3     
- Misses       2808     2814       +6     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-cli/src/TestNamePatternPrompt.js 94.11% <ø> (ø) ⬆️
...ages/pretty-format/src/plugins/ImmutablePlugins.js 100% <ø> (ø) ⬆️
...kages/pretty-format/src/plugins/ImmutableRecord.js 100% <ø> (ø) ⬆️
packages/jest-validate/src/utils.js 100% <ø> (ø) ⬆️
packages/eslint-config-fb-strict/index.js 0% <ø> (ø) ⬆️
packages/jest-cli/src/TestRunner.js 25.3% <ø> (+0.15%) ⬆️
packages/eslint-plugin-jest/src/index.js 100% <ø> (ø) ⬆️
packages/pretty-format/src/index.js 98.05% <ø> (ø) ⬆️
packages/jest-changed-files/src/index.js 0% <0%> (ø) ⬆️
packages/jest-validate/src/index.js 0% <0%> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dec54a3...69095fe. Read the comment docs.

SimenB added a commit to SimenB/jest that referenced this pull request Jun 9, 2017
@cpojer cpojer merged commit e0e170a into jestjs:master Jun 10, 2017
@SimenB SimenB deleted the lift-requires branch June 10, 2017 16:12
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
* Lift all inline requires to the top-level

We want to inline them using a babel plugin

* Remove one inlining that messes us up

* Inline two more requires causing the repl test to fail

* remove one unnecessary inline

* Fix prettier lint

* really prettier?
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants