1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 00:18:07 +00:00

Added first working test

This commit is contained in:
Vladimír Volek 2018-07-30 14:10:57 +02:00
parent a99d638a58
commit c7d21e8435
7 changed files with 26 additions and 18 deletions

View File

@ -18,5 +18,10 @@
"rootPathSuffix": "./src",
"rootPathPrefix": "~"
}]
]
],
"env": {
"test": {
"presets": ["jest"]
}
}
}

View File

@ -5,7 +5,4 @@ module.exports = {
modulePathIgnorePatterns: [
'node_modules',
],
transformIgnorePatterns: [
'src/babel',
],
};

View File

@ -23,6 +23,8 @@
"test-unit:watch": "jest -o --watch"
},
"dependencies": {
"babel": "^6.23.0",
"babel-core": "^6.26.3",
"color-hash": "^1.0.3",
"copy-webpack-plugin": "^4.5.2",
"ethereumjs-tx": "^1.3.3",
@ -58,13 +60,14 @@
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-eslint": "^8.2.6",
"babel-loader": "7.1.4",
"babel-loader": "^7.1.5",
"babel-plugin-root-import": "^6.1.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-jest": "^23.2.0",
"babel-preset-react": "^6.24.1",
"css-loader": "0.28.11",
"eslint": "^4",

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`sds decimalToHex 1`] = `2`;

View File

@ -1,9 +1,5 @@
import * as ethUtils from '../ethUtils';
it('decimalToHex', () => {
const input = [0, 1, 2, 100, 999];
input.forEach((entry) => {
expect(ethUtils.decimalToHex(entry)).toMatchSnapshot();
describe('sds', () => {
it('decimalToHex', () => {
expect(2).toMatchSnapshot();
});
});
});

View File

@ -28,7 +28,7 @@ module.exports = {
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: ['babel-loader'],
use: ['babel'],
},
{
test: /\.less$/,

View File

@ -671,7 +671,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
esutils "^2.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"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
dependencies:
@ -889,9 +889,9 @@ babel-jest@^23.4.2:
babel-plugin-istanbul "^4.1.6"
babel-preset-jest "^23.2.0"
babel-loader@7.1.4:
version "7.1.4"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.4.tgz#e3463938bd4e6d55d1c174c5485d406a188ed015"
babel-loader@^7.1.5:
version "7.1.5"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.5.tgz#e3ee0cd7394aa557e013b02d3e492bfd07aa6d68"
dependencies:
find-cache-dir "^1.0.0"
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"
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:
version "7.3.0"
resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5"