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

Commit

Permalink
Added unit tests for getPathByTabId in tabState
Browse files Browse the repository at this point in the history
Auditors: @bridiver
  • Loading branch information
bsclifton committed Jun 15, 2017
1 parent 2d73755 commit ecdb12c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/unit/app/common/state/tabStateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,15 @@ const shouldValidateAction = function (cb) {
}

describe('tabState unit tests', function () {
describe('getPathByTabId', function () {
it('returns null if tab is not found', function () {
assert.equal(tabState.getPathByTabId(twoTabsAppState, 333), null)
})
it('returns path if index found (as mutable array)', function () {
assert.deepEqual(tabState.getPathByTabId(twoTabsAppState, 1), ['tabs', 0])
})
})

describe('getByTabId', function () {
before(function () {
this.appState = twoTabsAppState
Expand Down

0 comments on commit ecdb12c

Please sign in to comment.