Skip to content

Commit

Permalink
refactor(navbar): update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyan-u committed Apr 30, 2024
1 parent fa07e87 commit c974e9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/navbar/__test__/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ describe('navbar', () => {
describe('props', () => {
it('fixed', async () => {
const navbar = mount(<NavBar title="标题" />);
expect(navbar.vm.navStyle).toContain('position: fixed');
expect(navbar.element.style.position).toBe('fixed')

await navbar.setProps({ fixed: false });
expect(navbar.vm.navStyle).toContain('position: relative');
expect(navbar.element.style.position).toBe('relative')
});

it('leftArrow', () => {
Expand Down

0 comments on commit c974e9f

Please sign in to comment.