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

Preprocessor does not fire "close" event #1560

Closed
bahmutov opened this issue Apr 10, 2018 · 1 comment
Closed

Preprocessor does not fire "close" event #1560

bahmutov opened this issue Apr 10, 2018 · 1 comment
Assignees
Labels
pkg/server This is due to an issue in the packages/server directory type: bug

Comments

@bahmutov
Copy link
Contributor

Seems to be a bug.

I expect to see "close" events fired when closing / stopping tests, but do not see any messages about this. This would cause problems running in GUI mode, especially when using custom preprocessors to bundle spec files.

packages/server/lib/plugins/preprocessor.coffee

Running against cypress-test-tiny with debug log messages enabled

$ DEBUG=cypress:server:preprocessor npm run dev -- --project ~/git/cypress-test-tiny/

> cypress@2.1.0 dev /Users/gleb/git/cypress
> node ./scripts/start.js "--project" "/Users/gleb/git/cypress-test-tiny/"

GET /__/ 200 19.482 ms - -
GET /__cypress/runner/cypress_runner.css 200 34.056 ms - -
GET /__cypress/runner/cypress_runner.js 200 249.248 ms - -
GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 200 3.645 ms - 77160
  cypress:server:preprocessor getFile /Users/gleb/git/cypress-test-tiny/cypress/integration/spec.js +0ms
  cypress:server:preprocessor set default preprocessor +0ms
GET /__cypress/iframes/integration/spec.js 200 244.981 ms - 711
  cypress:server:preprocessor getFile /Users/gleb/git/cypress-test-tiny/cypress/support/index.js +246ms
  cypress:server:preprocessor getFile /Users/gleb/git/cypress-test-tiny/cypress/integration/spec.js +6ms
GET /__cypress/tests?p=cypress/integration/spec.js-693 200 692.308 ms - 596
GET /__cypress/tests?p=cypress/support/index.js-184 200 735.031 ms - -
GET /__/ 200 3.335 ms - -
GET /__cypress/runner/cypress_runner.css 200 36.511 ms - -
GET /__cypress/runner/cypress_runner.js 200 245.277 ms - -
GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 200 1.363 ms - 77160
GET /__cypress/iframes/integration/spec.js 200 4.754 ms - 711
  cypress:server:preprocessor getFile /Users/gleb/git/cypress-test-tiny/cypress/support/index.js +14s
  cypress:server:preprocessor getFile /Users/gleb/git/cypress-test-tiny/cypress/integration/spec.js +2ms
GET /__cypress/tests?p=cypress/integration/spec.js-165 200 2.553 ms - 596
GET /__cypress/tests?p=cypress/support/index.js-548 200 4.557 ms - -

So I see getFile and set default preprocessor messages, but not anything related to close event.

Also noticed same in cypress-io/cypress-example-recipes#136

@bahmutov bahmutov added type: question pkg/server This is due to an issue in the packages/server directory labels Apr 10, 2018
@chrisbreiding
Copy link
Contributor

Looks like it fires when switching files or closing a project, but not when closing the browser. Good catch! Working on a fix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/server This is due to an issue in the packages/server directory type: bug
Projects
None yet
Development

No branches or pull requests

3 participants