mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Added test snapshot and updated coverage
This commit is contained in:
parent
c7d21e8435
commit
7beb6131b8
@ -1,8 +1,12 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
rootDir: './src',
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
testURL: 'http://localhost',
|
testURL: 'http://localhost',
|
||||||
|
|
||||||
modulePathIgnorePatterns: [
|
modulePathIgnorePatterns: [
|
||||||
'node_modules',
|
'node_modules',
|
||||||
],
|
],
|
||||||
|
collectCoverageFrom: [
|
||||||
|
'js/utils/**.js',
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`sds decimalToHex 1`] = `2`;
|
exports[`eth utils decimalToHex 1`] = `"0"`;
|
||||||
|
|
||||||
|
exports[`eth utils decimalToHex 2`] = `"1"`;
|
||||||
|
|
||||||
|
exports[`eth utils decimalToHex 3`] = `"2"`;
|
||||||
|
|
||||||
|
exports[`eth utils decimalToHex 4`] = `"64"`;
|
||||||
|
|
||||||
|
exports[`eth utils decimalToHex 5`] = `"3e7"`;
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
describe('sds', () => {
|
import * as ethUtils from '../ethUtils';
|
||||||
|
|
||||||
|
describe('eth utils', () => {
|
||||||
it('decimalToHex', () => {
|
it('decimalToHex', () => {
|
||||||
expect(2).toMatchSnapshot();
|
const input = [0, 1, 2, 100, 999];
|
||||||
|
|
||||||
|
input.forEach((entry) => {
|
||||||
|
expect(ethUtils.decimalToHex(entry)).toMatchSnapshot();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user