made it this far, chrome missing for actual js code
This commit is contained in:
10
tests/empty.html
Normal file
10
tests/empty.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Empty HTML Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,8 @@
|
||||
var chai = require('chai');
|
||||
var chrome = require('sinon-chrome');
|
||||
var sinon = require('sinon-chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import changeExtensionTooltip from '../../assets/js/helpers/changeExtensionTooltip';
|
||||
|
||||
describe('changeExtensionTooltip', function() {
|
||||
@@ -6,10 +11,8 @@ describe('changeExtensionTooltip', function() {
|
||||
});
|
||||
|
||||
it('should change the extension tooltip', function() {
|
||||
// Need to attach the spy first
|
||||
spyOn(chrome.browserAction, 'setTitle');
|
||||
changeExtensionTooltip('WakaTime');
|
||||
expect(chrome.browserAction.setTitle).toHaveBeenCalledWith({title: 'Wakatime'});
|
||||
// sinon.assert.calledWithMatch(chrome.browserAction.setTitle, {title: 'WakaTime'});
|
||||
sinon.assert.calledWithMatch(chrome.browserAction.setTitle, {title: 'WakaTime'});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user