Skip to content

Commit

Permalink
icons might not show in some envs
Browse files Browse the repository at this point in the history
  • Loading branch information
psilospore committed Feb 5, 2018
1 parent 9135962 commit fb2b81e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,26 @@
exports[`test always 1`] = `
Array [
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Expand All @@ -38,22 +32,18 @@ Array [
exports[`test change 1`] = `
Array [
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Expand All @@ -63,27 +53,22 @@ Array [
exports[`test failure-change 1`] = `
Array [
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Expand All @@ -93,17 +78,14 @@ Array [
exports[`test success 1`] = `
Array [
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Expand All @@ -113,27 +95,22 @@ Array [
exports[`test success-change 1`] = `
Array [
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 tests passed",
"title": "100% Passed",
},
Object {
"icon": true,
"message": "3 of 3 tests failed",
"title": "100% Failed",
},
Expand Down
7 changes: 1 addition & 6 deletions packages/jest-cli/src/__tests__/notify_reporter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import NotifyReporter from '../reporters/notify_reporter';
import type {TestSchedulerContext} from '../test_scheduler';
import type {AggregatedResult} from '../../../../types/TestResult';

const ICON_PATH = '/assets/jest_logo.png';

jest.mock('../reporters/default_reporter');
jest.mock('node-notifier', () => ({
notify: jest.fn(),
Expand Down Expand Up @@ -57,8 +55,6 @@ const notifyEvents = [
aggregatedResultsFailure,
];

const iconShown = path => path.endsWith(ICON_PATH);

test('.addReporter() .removeReporter()', () => {
const scheduler = new TestScheduler(
{},
Expand Down Expand Up @@ -92,8 +88,7 @@ const testModes = (notifyMode: string, arl: Array<AggregatedResult>) => {
});

expect(
notify.notify.mock.calls.map(([{icon, message, title}]) => ({
icon: iconShown(icon),
notify.notify.mock.calls.map(([{message, title}]) => ({
message: message.replace('\u26D4\uFE0F ', '').replace('\u2705 ', ''),
title,
})),
Expand Down

0 comments on commit fb2b81e

Please sign in to comment.