mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-23 09:42:49 +02:00
Modify mocha-test-clients to use Karma (#149)
This commit is contained in:
committed by
Kumar McMillan
parent
395786e353
commit
8638cd7698
@@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Tests for background</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/chai/chai.js"></script>
|
||||
<script src="../node_modules/expect.js/index.js"></script>
|
||||
<script src="../node_modules/chrome-mock/browser.js"></script>
|
||||
<script>
|
||||
mocha.ui('bdd');
|
||||
mocha.reporter('html');
|
||||
expect = chai.expect;
|
||||
</script>
|
||||
|
||||
<script src="../addon/background.js"></script>
|
||||
<script src="lib/background.test.js"></script>
|
||||
<script>
|
||||
mocha.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,10 @@
|
||||
describe('Background', function() {
|
||||
describe('ping', function() {
|
||||
it('should return pong in response', function() {
|
||||
it('should return pong in response', function(done) {
|
||||
Background.ping(false, false, function(response) {
|
||||
expect(response).to.equal('pong');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user