Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
More descriptive function name (follow up of #8589)
Browse files Browse the repository at this point in the history
Auditors: @bsclifton

Test plan:
- npm run unittest
  • Loading branch information
NejcZdovc committed May 1, 2017
1 parent 5954ac9 commit b612b3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/browser/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const debounce = require('../../js/lib/debounce')
const {getSetting} = require('../../js/settings')
const locale = require('../locale')
const LocalShortcuts = require('../localShortcuts')
const {getSiteProps} = require('../common/lib/windowsUtil')
const {getPinnedSiteProps} = require('../common/lib/windowsUtil')
const {makeImmutable} = require('../common/state/immutableUtil')
const {getPinnedTabsByWindowId} = require('../common/state/tabState')
const {siteSort} = require('../../js/state/siteUtil')
Expand Down Expand Up @@ -71,7 +71,7 @@ const updatePinnedTabs = (win) => {
const state = appStore.getState()
const windowId = win.id
const pinnedSites = state.get('sites').toList().filter((site) =>
site.get('tags').includes(siteTags.PINNED)).map(site => getSiteProps(site))
site.get('tags').includes(siteTags.PINNED)).map(site => getPinnedSiteProps(site))
const pinnedTabs = getPinnedTabsByWindowId(state, windowId)

pinnedSites.filter((site) =>
Expand Down
2 changes: 1 addition & 1 deletion app/common/lib/windowsUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const Immutable = require('immutable')

module.exports.getSiteProps = site => {
module.exports.getPinnedSiteProps = site => {
return Immutable.fromJS({
location: site.get('location'),
order: site.get('order'),
Expand Down
6 changes: 3 additions & 3 deletions test/unit/app/common/lib/windowsUtilTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('windowsUtil', () => {
})
let site

describe('getSiteProps', () => {
describe('getPinnedSiteProps', () => {
beforeEach(() => {
site = Immutable.fromJS({
favicon: 'https://css-tricks.com/favicon.ico',
Expand All @@ -28,12 +28,12 @@ describe('windowsUtil', () => {
})
})
it('returns object with necessary fields', () => {
const result = windowsUtil.getSiteProps(site)
const result = windowsUtil.getPinnedSiteProps(site)
assert.deepEqual(expectedSiteProps, result)
})
it('set partitionNumber field to 0 in case of missing this field', () => {
site = site.delete('partitionNumber')
const result = windowsUtil.getSiteProps(site)
const result = windowsUtil.getPinnedSiteProps(site)
assert.equal(0, result.get('partitionNumber'))
})
})
Expand Down

1 comment on commit b612b3f

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

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

++

Please sign in to comment.