Skip to content

Commit

Permalink
delete not used vars
Browse files Browse the repository at this point in the history
  • Loading branch information
hogashi committed Nov 28, 2023
1 parent 6752982 commit a9d6070
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions __tests__/ButtonSetter.test.js
Original file line number Diff line number Diff line change
@@ -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,
};
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
16 changes: 8 additions & 8 deletions __tests__/ButtonSetterTweetDeck.test.js
Original file line number Diff line number Diff line change
@@ -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,
};
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion coverage/badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a9d6070

Please sign in to comment.