From a9d60705dd2db80292e6083d5352cf12b366666a Mon Sep 17 00:00:00 2001 From: hogashi Date: Wed, 29 Nov 2023 03:41:25 +0900 Subject: [PATCH] delete not used vars --- __tests__/ButtonSetter.test.js | 18 +++++++++--------- __tests__/ButtonSetterTweetDeck.test.js | 16 ++++++++-------- coverage/badge.svg | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/__tests__/ButtonSetter.test.js b/__tests__/ButtonSetter.test.js index a532a773..e43c169e 100644 --- a/__tests__/ButtonSetter.test.js +++ b/__tests__/ButtonSetter.test.js @@ -1,14 +1,14 @@ import { ButtonSetter } from '../src/ButtonSetter'; // import * as main from '../src/main'; -import { SHOW_ON_TIMELINE, SHOW_ON_TWEET_DETAIL, isFalse, isTrue } from '../src/constants'; +import { SHOW_ON_TIMELINE, SHOW_ON_TWEET_DETAIL } from '../src/constants'; function makeAllEnabledOptions() { return { - SHOW_ON_TIMELINE: isTrue, - SHOW_ON_TWEET_DETAIL: isTrue, - SHOW_ON_TWEETDECK_TIMELINE: isTrue, - SHOW_ON_TWEETDECK_TWEET_DETAIL: isTrue, - STRIP_IMAGE_SUFFIX: isTrue, + SHOW_ON_TIMELINE: true, + SHOW_ON_TWEET_DETAIL: true, + SHOW_ON_TWEETDECK_TIMELINE: true, + SHOW_ON_TWEETDECK_TWEET_DETAIL: true, + STRIP_IMAGE_SUFFIX: true, }; } @@ -300,7 +300,7 @@ describe('ButtonSetter', () => { buttonSetter.setButton = jest.fn(); const options = makeAllEnabledOptions(); - options[SHOW_ON_TIMELINE] = isFalse; + options[SHOW_ON_TIMELINE] = false; buttonSetter._setButtonOnTimeline(options); expect(buttonSetter.setButton).not.toHaveBeenCalled(); @@ -455,7 +455,7 @@ describe('ButtonSetter', () => { buttonSetter.setButton = jest.fn(); const options = makeAllEnabledOptions(); - options[SHOW_ON_TWEET_DETAIL] = isFalse; + options[SHOW_ON_TWEET_DETAIL] = false; buttonSetter.setButtonOnTweetDetail(options); expect(buttonSetter.setButton).not.toHaveBeenCalled(); @@ -649,7 +649,7 @@ describe('ButtonSetter', () => { buttonSetter.setReactLayoutButton = jest.fn(); const options = makeAllEnabledOptions(); - options[SHOW_ON_TIMELINE] = isFalse; + options[SHOW_ON_TIMELINE] = false; buttonSetter._setButtonOnReactLayoutTimeline(options); expect(buttonSetter.setReactLayoutButton).not.toHaveBeenCalled(); diff --git a/__tests__/ButtonSetterTweetDeck.test.js b/__tests__/ButtonSetterTweetDeck.test.js index 12b89d08..ce96d10f 100644 --- a/__tests__/ButtonSetterTweetDeck.test.js +++ b/__tests__/ButtonSetterTweetDeck.test.js @@ -1,13 +1,13 @@ import { ButtonSetterTweetDeck } from '../src/ButtonSetterTweetDeck'; -import { SHOW_ON_TWEETDECK_TIMELINE, SHOW_ON_TWEETDECK_TWEET_DETAIL, isFalse, isTrue } from '../src/constants'; +import { SHOW_ON_TWEETDECK_TIMELINE, SHOW_ON_TWEETDECK_TWEET_DETAIL } from '../src/constants'; function makeAllEnabledOptions() { return { - SHOW_ON_TIMELINE: isTrue, - SHOW_ON_TWEET_DETAIL: isTrue, - SHOW_ON_TWEETDECK_TIMELINE: isTrue, - SHOW_ON_TWEETDECK_TWEET_DETAIL: isTrue, - STRIP_IMAGE_SUFFIX: isTrue, + SHOW_ON_TIMELINE: true, + SHOW_ON_TWEET_DETAIL: true, + SHOW_ON_TWEETDECK_TIMELINE: true, + SHOW_ON_TWEETDECK_TWEET_DETAIL: true, + STRIP_IMAGE_SUFFIX: true, }; } @@ -197,7 +197,7 @@ describe('ButtonSetterTweetDeck', () => { buttonSetter.setButton = jest.fn(); const options = makeAllEnabledOptions(); - options[SHOW_ON_TWEETDECK_TIMELINE] = isFalse; + options[SHOW_ON_TWEETDECK_TIMELINE] = false; buttonSetter.setButtonOnTimeline(options); expect(buttonSetter.setButton).not.toHaveBeenCalled(); @@ -410,7 +410,7 @@ describe('ButtonSetterTweetDeck', () => { buttonSetter.setButton = jest.fn(); const options = makeAllEnabledOptions(); - options[SHOW_ON_TWEETDECK_TWEET_DETAIL] = isFalse; + options[SHOW_ON_TWEETDECK_TWEET_DETAIL] = false; buttonSetter.setButtonOnTweetDetail(options); expect(buttonSetter.setButton).not.toHaveBeenCalled(); diff --git a/coverage/badge.svg b/coverage/badge.svg index 5a37a0a4..45ce1d49 100644 --- a/coverage/badge.svg +++ b/coverage/badge.svg @@ -1 +1 @@ -Coverage: 83.18%Coverage83.18% \ No newline at end of file +Coverage: 83.33%Coverage83.33% \ No newline at end of file