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

install-test is flaky in CI #3965

Open
jedwards1211 opened this issue Dec 4, 2020 · 3 comments
Open

install-test is flaky in CI #3965

jedwards1211 opened this issue Dec 4, 2020 · 3 comments

Comments

@jedwards1211
Copy link
Contributor

Getting this error randomly in some of my PRs (example):

$ jest && yarn lint
FAIL src/commands/__tests__/install-test.js
  ● install (command) › end-to-end tests › overwrites tweaked libdefs when --overwrite is passed

    expect(received).toBe(expected) // Object.is equality

    Expected: "// flow-typed signature: 7a7fa7619340bfebb825752ae5efb893
    // flow-typed version: 0beab4f35a/foo_v1.x.x/flow_>=v0.38.x·
    "
    Received: ""

      631 | 
      632 |         // Verify that the tweaked libdef file wasn't overwritten
    > 633 |         expect(await (await fs.readFile(libdefFilePath)).toString()).toBe(
          |                                                                      ^
      634 |           libdefFileContent,
      635 |         );
      636 |       });

      at toBe (src/commands/__tests__/install-test.js:633:70)
      at src/commands/__tests__/install-test.js:294:11
      at testProject (src/lib/TEST_UTILS.js:31:3)
      at fakeProjectEnv (src/commands/__tests__/install-test.js:271:14)
@jedwards1211
Copy link
Contributor Author

jedwards1211 commented Dec 4, 2020

What's with await (await fs.readFile(libdefFilePath)).toString()? Buffer.toString() is not async. await fs.readFile(libdefFilePath, 'utf8') is equivalent anyway.

@AndrewSouthpaw
Copy link
Contributor

Is this still an issue for you @jedwards1211?

@jedwards1211
Copy link
Contributor Author

Probably but I don't know yet, my sequelize PR is the first one I've made since reporting this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants