mock browser

jh-changes
Shin'ya Ueoka 7 years ago
parent 1b70ee966d
commit a63311bd34
  1. 2
      karma.conf.js
  2. 4
      test/main.js

@ -4,7 +4,7 @@ module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha'],
frameworks: ['mocha', 'sinon'],
files: [
'test/main.js',
'test/**/*.test.js',

@ -1,2 +1,6 @@
import chai from 'chai';
const browserFake = require('webextensions-api-fake');
const browser = browserFake();
global.expect = chai.expect;
global.browser = browser;