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

"flush" as it is used in tests #123

Closed
uhop opened this issue Jul 7, 2020 · 1 comment
Closed

"flush" as it is used in tests #123

uhop opened this issue Jul 7, 2020 · 1 comment

Comments

@uhop
Copy link
Contributor

uhop commented Jul 7, 2020

In __tests__.index.js there is a section:

it('should support Z_SYNC_FLUSH', (done) => {
  const app = new Koa()

  app.use(compress({
    flush: zlib.constants.Z_SYNC_FLUSH
  }))
  // and so on
})

Is flush really a top-level option? Or should it be:

app.use(compress({
  gzip: { // or deflate?
    flush: zlib.constants.Z_SYNC_FLUSH
  }
}))

The test succeeds anyway: with the existing code, with added gzip, even when the flush line is commented out.

I don't know what effects should be tested but it looks like they are not observed. I think it should be clarified and the test updated.

@jonathanong
Copy link
Member

you're right. the test doesn't actually do anything, so I'll delete it. feel free to make a new test if you would like.

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