Add remove setting api

This commit is contained in:
redhoodsu
2018-08-23 16:13:56 +08:00
parent d66e1de64a
commit 548cc9b513
13 changed files with 256 additions and 97 deletions

View File

@@ -67,4 +67,12 @@ describe('settings', function() {
.click()
expect(cfg.get('testColor')).toBe('rgb(0, 0, 0)')
})
it('remove', function () {
let text = 'Test Switch'
tool.switch(cfg, 'testSwitch', text)
expect($tool.find('.eruda-switch')).toContainText(text)
tool.remove(cfg, 'testSwitch')
expect($tool.find('.eruda-switch')).toHaveLength(0)
})
})