Skip to content

Commit

Permalink
test(core): fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
theniceangel committed Feb 1, 2021
1 parent c72f4a3 commit ed152da
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/core/src/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ describe('BetterScroll Core', () => {
BScroll.use(unnamedPlugin as any)
expect(spyFn).toBeCalled()
spyFn.mockRestore()

const spyFn2 = jest.spyOn(console, 'error')
// duplicate register plugins
const plugin2 = class MyPlugin2 {
static pluginName = 'myPlugin'
}
BScroll.use(plugin2)
expect(spyFn2).toBeCalled()
spyFn2.mockRestore()
})

it('should init plugins when set top-level of BScroll options', () => {
Expand All @@ -53,7 +44,7 @@ describe('BetterScroll Core', () => {
wrapper.appendChild(document.createElement('p'))

let bs = new BScroll(wrapper, {
myPlugin2: true,
myPlugin2: true
})
expect(mockFn).toBeCalledWith(bs)
})
Expand Down

0 comments on commit ed152da

Please sign in to comment.