Added test snapshot and updated coverage

pull/1/head
Vladimír Volek 6 years ago
parent c7d21e8435
commit 7beb6131b8

@ -1,8 +1,12 @@
module.exports = {
rootDir: './src',
collectCoverage: true,
testURL: 'http://localhost',
modulePathIgnorePatterns: [
'node_modules',
],
collectCoverageFrom: [
'js/utils/**.js',
],
};

@ -1,3 +1,11 @@
// 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', () => {
expect(2).toMatchSnapshot();
const input = [0, 1, 2, 100, 999];
input.forEach((entry) => {
expect(ethUtils.decimalToHex(entry)).toMatchSnapshot();
});
});
});

Loading…
Cancel
Save