mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Added first working test
This commit is contained in:
parent
a99d638a58
commit
c7d21e8435
7
.babelrc
7
.babelrc
@ -18,5 +18,10 @@
|
|||||||
"rootPathSuffix": "./src",
|
"rootPathSuffix": "./src",
|
||||||
"rootPathPrefix": "~"
|
"rootPathPrefix": "~"
|
||||||
}]
|
}]
|
||||||
]
|
],
|
||||||
|
"env": {
|
||||||
|
"test": {
|
||||||
|
"presets": ["jest"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -5,7 +5,4 @@ module.exports = {
|
|||||||
modulePathIgnorePatterns: [
|
modulePathIgnorePatterns: [
|
||||||
'node_modules',
|
'node_modules',
|
||||||
],
|
],
|
||||||
transformIgnorePatterns: [
|
|
||||||
'src/babel',
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
"test-unit:watch": "jest -o --watch"
|
"test-unit:watch": "jest -o --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"babel": "^6.23.0",
|
||||||
|
"babel-core": "^6.26.3",
|
||||||
"color-hash": "^1.0.3",
|
"color-hash": "^1.0.3",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"ethereumjs-tx": "^1.3.3",
|
"ethereumjs-tx": "^1.3.3",
|
||||||
@ -58,13 +60,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-cli": "^6.24.1",
|
"babel-cli": "^6.24.1",
|
||||||
"babel-eslint": "^8.2.6",
|
"babel-eslint": "^8.2.6",
|
||||||
"babel-loader": "7.1.4",
|
"babel-loader": "^7.1.5",
|
||||||
"babel-plugin-root-import": "^6.1.0",
|
"babel-plugin-root-import": "^6.1.0",
|
||||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
"babel-preset-env": "^1.6.0",
|
"babel-preset-env": "^1.6.0",
|
||||||
|
"babel-preset-jest": "^23.2.0",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"css-loader": "0.28.11",
|
"css-loader": "0.28.11",
|
||||||
"eslint": "^4",
|
"eslint": "^4",
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`sds decimalToHex 1`] = `2`;
|
@ -1,9 +1,5 @@
|
|||||||
import * as ethUtils from '../ethUtils';
|
describe('sds', () => {
|
||||||
|
it('decimalToHex', () => {
|
||||||
it('decimalToHex', () => {
|
expect(2).toMatchSnapshot();
|
||||||
const input = [0, 1, 2, 100, 999];
|
|
||||||
|
|
||||||
input.forEach((entry) => {
|
|
||||||
expect(ethUtils.decimalToHex(entry)).toMatchSnapshot();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -28,7 +28,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: ['babel-loader'],
|
use: ['babel'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.less$/,
|
test: /\.less$/,
|
||||||
|
12
yarn.lock
12
yarn.lock
@ -671,7 +671,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
|
|||||||
esutils "^2.0.2"
|
esutils "^2.0.2"
|
||||||
js-tokens "^3.0.2"
|
js-tokens "^3.0.2"
|
||||||
|
|
||||||
babel-core@^6.0.0:
|
babel-core@^6.0.0, babel-core@^6.26.3:
|
||||||
version "6.26.3"
|
version "6.26.3"
|
||||||
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
|
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -889,9 +889,9 @@ babel-jest@^23.4.2:
|
|||||||
babel-plugin-istanbul "^4.1.6"
|
babel-plugin-istanbul "^4.1.6"
|
||||||
babel-preset-jest "^23.2.0"
|
babel-preset-jest "^23.2.0"
|
||||||
|
|
||||||
babel-loader@7.1.4:
|
babel-loader@^7.1.5:
|
||||||
version "7.1.4"
|
version "7.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.4.tgz#e3463938bd4e6d55d1c174c5485d406a188ed015"
|
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.5.tgz#e3ee0cd7394aa557e013b02d3e492bfd07aa6d68"
|
||||||
dependencies:
|
dependencies:
|
||||||
find-cache-dir "^1.0.0"
|
find-cache-dir "^1.0.0"
|
||||||
loader-utils "^1.0.2"
|
loader-utils "^1.0.2"
|
||||||
@ -1438,6 +1438,10 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.
|
|||||||
lodash "^4.17.4"
|
lodash "^4.17.4"
|
||||||
to-fast-properties "^1.0.3"
|
to-fast-properties "^1.0.3"
|
||||||
|
|
||||||
|
babel@^6.23.0:
|
||||||
|
version "6.23.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel/-/babel-6.23.0.tgz#d0d1e7d803e974765beea3232d4e153c0efb90f4"
|
||||||
|
|
||||||
babelify@^7.3.0:
|
babelify@^7.3.0:
|
||||||
version "7.3.0"
|
version "7.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5"
|
resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5"
|
||||||
|
Loading…
Reference in New Issue
Block a user