Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 3180d67

Browse files
author
Giuseppe Aremare
committed
update(core): add missing test
1 parent 9806d98 commit 3180d67

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
"no-extra-parens": [2,"all"],
1616
"no-extra-semi": 2,
1717
"linebreak-style": [2,"unix"],
18-
"semi": [2,"never"]
18+
"semi": [2,"never"],
19+
"no-trailing-spaces": [2,{"skipBlankLines":false}]
1920
}
2021
};

tests/ActiveComponent_test.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,15 @@ describe('Test ActiveDropdown component', () => {
1515
expect(component.find('.active').length).to.equal(1)
1616
done()
1717
})
18+
19+
it('can return component without class active', (done) => {
20+
global.window = {
21+
location: {
22+
pathname: '/foo/baz'
23+
}
24+
}
25+
const component = mount(<ActiveDropdown activeRoutes={['/foo/bar', '/subaru/baracca']} baseClassName="dropdown-toggle" title="Foo" />)
26+
expect(component.find('.active').length).to.equal(0)
27+
done()
28+
})
1829
})

0 commit comments

Comments
 (0)