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

Add notifications for test results #1170

Merged
merged 7 commits into from
Jun 16, 2016
Merged

Add notifications for test results #1170

merged 7 commits into from
Jun 16, 2016

Conversation

marcelerz
Copy link
Contributor

No description provided.

@ghost ghost added the CLA Signed ✔️ label Jun 15, 2016
@@ -16,7 +16,8 @@
"minimatch": "^3.0.0",
"mkdirp": "^0.5.1",
"progress": "^1.1.8",
"rimraf": "^2.5.2"
"rimraf": "^2.5.2",
"growl": "^1.9.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

that's a top level package.json though. You might want to put it into packages/jest-cli/package.json

@cpojer
Copy link
Member

cpojer commented Jun 15, 2016

woah this is cool!

cc @gillesruppert – we need to bring this to www too :) Does growl somehow work across ssh sessions?

/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* @flow
Copy link
Member

Choose a reason for hiding this comment

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

this should be after the copyright notice :)

The reporters were moved from runtime to config, but the Growler class in this file did not move which broke the build.
}
};

class Growler {
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a test for this class? I wanna make sure we won't be breaking this feature :)

We can just jest.mock('grown') and check if it has been called with the proper args.

The reporters were moved from runtime to config, but the Growler class in this file did not move which broke the build.
@@ -76,6 +76,7 @@ Jest uses Jasmine 2 by default. An introduction to Jasmine 2 can be found
- [`testRunner` [string]](#testrunner-string)
- [`unmockedModulePathPatterns` [array<string>]](#unmockedmodulepathpatterns-array-string)
- [`verbose` [boolean]](#verbose-boolean)
- [`growl` [boolean]](#growl-boolean)
Copy link
Member

Choose a reason for hiding this comment

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

can we put this and the description below into its correct alphabetical location?

@cpojer
Copy link
Member

cpojer commented Jun 15, 2016

Does growl support images at 2x for retina displays? If so, can you add a file that is 2x as big? Most Mac users nowadays use a retina display, so it should be the default :)

I'm also sorry for our silly abc style guide. I wonder if there is a lint rule for this.

@marcelerz
Copy link
Contributor Author

I will update the code with the abc rule.
For Growl, I can only give one image. Do you know of a way to figure out if the machine has a retina display - from node?

@cpojer
Copy link
Member

cpojer commented Jun 15, 2016

Does growl resize the image to a set size? If yes, we could just ship the 2x image and let growl take care of it?

On Wed, Jun 15, 2016 at 4:01 PM -0700, "Marcel Erz" <[email protected]mailto:[email protected]> wrote:

I will update the code with the abc rule.
For Growl, I can only give one image. Do you know of a way to figure out if the machine has a retina display - from node?

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//pull/1170#issuecomment-226344918, or mute the threadhttps://github.com/notifications/unsubscribe/AAA0KPEFdoC9J7aSh_6C-ThVzi53EJRuks5qMIQ0gaJpZM4I22ra.

@zpao
Copy link
Contributor

zpao commented Jun 16, 2016

A couple comments from the outside (since @cpojer posted on Twitter):

  1. Looks like the https://www.npmjs.com/package/node-notifier can support Windows out of the box… might be a better choice?
  2. Also, I would consider renaming the flag from growl to something more generic (while growl was the defacto standard on OS X a few years ago, native notifications have taken over)

/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* @flow
Copy link
Contributor

Choose a reason for hiding this comment

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

Typically we put this below the license. Ignore me if you just copy-pasted from another file - we can do a bulk change later if that's the case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will change it.

@marcelerz
Copy link
Contributor Author

@zpao Sounds good. I will move it to node-notifier.

Any suggestions for names? Maybe notify?

@cpojer
Copy link
Member

cpojer commented Jun 16, 2016

"Notifier" as a class name is good :)

@marcelerz
Copy link
Contributor Author

Will also change the option from growl to notify

@marcelerz marcelerz changed the title Add growl notifications Add notifications for test results Jun 16, 2016
@gillesruppert
Copy link
Contributor

This is awesome! Now I need to get that into www :)

let message;

if (result.success) {
info = NOTIFICATIONS['success'];
Copy link
Member

Choose a reason for hiding this comment

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

please do NOTIFICATIONS.success.

@cpojer cpojer merged commit 88cf095 into jestjs:master Jun 16, 2016
@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 14, 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