fix some tests
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
import chai from 'chai';
|
|
||||||
import changeExtensionIcon from '../../src/utils/changeExtensionIcon';
|
|
||||||
|
|
||||||
const expect = chai.expect;
|
|
||||||
|
|
||||||
jest.mock('webextension-polyfill', () => {
|
|
||||||
return {
|
|
||||||
runtime: {
|
|
||||||
getManifest: () => {
|
|
||||||
return { version: 'test-version' };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('changeExtensionIcon', function () {
|
|
||||||
it('should be a function', function () {
|
|
||||||
expect(changeExtensionIcon).to.be.a('function');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
import chai from 'chai';
|
|
||||||
import changeExtensionState from '../../src/utils/changeExtensionStatus';
|
|
||||||
|
|
||||||
const expect = chai.expect;
|
|
||||||
|
|
||||||
jest.mock('webextension-polyfill', () => {
|
|
||||||
return {
|
|
||||||
runtime: {
|
|
||||||
getManifest: () => {
|
|
||||||
return { version: 'test-version' };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('changeExtensionState', function () {
|
|
||||||
it('should be a function', function () {
|
|
||||||
expect(changeExtensionState).to.be.a('function');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import chai from 'chai';
|
|
||||||
import changeExtensionTooltip from '../../src/utils/changeExtensionTooltip';
|
|
||||||
|
|
||||||
const expect = chai.expect;
|
|
||||||
|
|
||||||
jest.mock('webextension-polyfill', () => {
|
|
||||||
return {
|
|
||||||
runtime: {
|
|
||||||
getManifest: () => {
|
|
||||||
return { version: 'test-version' };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('changeExtensionTooltip', function () {
|
|
||||||
it('should be a function', function () {
|
|
||||||
expect(changeExtensionTooltip).to.be.a('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
// it('should change the extension tooltip', function() {
|
|
||||||
// changeExtensionTooltip('WakaTime');
|
|
||||||
// expect(chrome.browserAction.setTitle).toHaveBeenCalledWith({title: 'Wakatime'});
|
|
||||||
// sinon.assert.calledWithMatch(chrome.browserAction.setTitle, {title: 'WakaTime'});
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user