mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 20:02:58 +01:00
Added basic es6 mocha test suite
This commit is contained in:
parent
1ff518a94e
commit
da31f4daed
@ -4,10 +4,12 @@
|
|||||||
"public": false,
|
"public": false,
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "gulp dev"
|
"start": "gulp dev",
|
||||||
|
"test": "mocha --compilers js:babel-register"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "^1.5.2",
|
"async": "^1.5.2",
|
||||||
|
"bip39": "^2.2.0",
|
||||||
"clone": "^1.0.2",
|
"clone": "^1.0.2",
|
||||||
"dnode": "^1.2.2",
|
"dnode": "^1.2.2",
|
||||||
"end-of-stream": "^1.1.0",
|
"end-of-stream": "^1.1.0",
|
||||||
@ -28,6 +30,8 @@
|
|||||||
"xtend": "^4.0.1"
|
"xtend": "^4.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"babel-preset-es2015": "^6.6.0",
|
||||||
|
"babel-register": "^6.7.2",
|
||||||
"browserify": "^13.0.0",
|
"browserify": "^13.0.0",
|
||||||
"del": "^2.2.0",
|
"del": "^2.2.0",
|
||||||
"gulp": "github:gulpjs/gulp#4.0",
|
"gulp": "github:gulpjs/gulp#4.0",
|
||||||
@ -37,6 +41,7 @@
|
|||||||
"gulp-watch": "^4.3.5",
|
"gulp-watch": "^4.3.5",
|
||||||
"jshint-stylish": "~0.1.5",
|
"jshint-stylish": "~0.1.5",
|
||||||
"lodash.assign": "^4.0.6",
|
"lodash.assign": "^4.0.6",
|
||||||
|
"tape": "^4.5.1",
|
||||||
"vinyl-buffer": "^1.0.0",
|
"vinyl-buffer": "^1.0.0",
|
||||||
"vinyl-source-stream": "^1.1.0",
|
"vinyl-source-stream": "^1.1.0",
|
||||||
"watchify": "^3.7.0"
|
"watchify": "^3.7.0"
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Mocha Spec Runner</title>
|
|
||||||
<link rel="stylesheet" href="../bower_components/mocha/mocha.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="mocha"></div>
|
|
||||||
<script src="../bower_components/mocha/mocha.js"></script>
|
|
||||||
<script>mocha.setup('bdd');</script>
|
|
||||||
<script src="../bower_components/chai/chai.js"></script>
|
|
||||||
<script>
|
|
||||||
var assert = chai.assert;
|
|
||||||
var expect = chai.expect;
|
|
||||||
var should = chai.should();
|
|
||||||
</script>
|
|
||||||
<!-- bower:js -->
|
|
||||||
<!-- endbower -->
|
|
||||||
<!-- include source files here... -->
|
|
||||||
<!-- include spec files here... -->
|
|
||||||
<script src="spec/test.js"></script>
|
|
||||||
<script>
|
|
||||||
if (navigator.userAgent.indexOf('PhantomJS') === -1) {
|
|
||||||
mocha.run();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
11
test/index.js
Normal file
11
test/index.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
var assert = require('assert');
|
||||||
|
var idStore = require('../app/scripts/lib/idStore')
|
||||||
|
|
||||||
|
describe('IdentityStore', function() {
|
||||||
|
describe('#_createFirstWallet', function () {
|
||||||
|
it('should return the expected keystore', function () {
|
||||||
|
|
||||||
|
assert.equal(1,1)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -1,11 +0,0 @@
|
|||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
describe('Give it some context', function () {
|
|
||||||
describe('maybe a bit more context here', function () {
|
|
||||||
it('should run here few assertions', function () {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})();
|
|
Loading…
Reference in New Issue
Block a user