File tree 7 files changed +65
-413
lines changed
7 files changed +65
-413
lines changed Original file line number Diff line number Diff line change 1
1
# Minimal Hapi React Webpack Boilerplate
2
2
3
- Secondary ticket market for PassageX
4
-
5
3
### Overview
6
4
7
5
* React (client) hot module reloading is configured with react-transform-hmr
Original file line number Diff line number Diff line change
1
+ import { pxtToWei } from '../src/utils/charge' ;
2
+
3
+ describe ( 'pxtToWei' , ( ) => {
4
+ test ( 'integer' , ( ) => {
5
+ const pxt = 1
6
+ expect ( pxtToWei ( pxt ) ) . toBe ( 1000000000000000000 ) ;
7
+ } ) ;
8
+
9
+ test ( 'string' , ( ) => {
10
+ const pxt = "1"
11
+ expect ( pxtToWei ( pxt ) ) . toBe ( 1000000000000000000 ) ;
12
+ } ) ;
13
+
14
+ test ( 'decimal' , ( ) => {
15
+ const pxt = 0.1
16
+ expect ( pxtToWei ( pxt ) ) . toBe ( 100000000000000000 ) ;
17
+ } ) ;
18
+
19
+ test ( 'long decimal' , ( ) => {
20
+ const pxt = 0.1046689365421890789
21
+ expect ( pxtToWei ( pxt ) ) . toBe ( 104668936542189078 ) ;
22
+ } ) ;
23
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import Test from '../src/pages/Test' ;
2
+ import React from 'react' ;
3
+ import { mount } from 'enzyme' ;
4
+
5
+ describe ( 'Test page' , ( ) => {
6
+
7
+ test ( 'Title' , ( ) => {
8
+ const wrapper = mount (
9
+ < Test title = { "My Title" } />
10
+ ) ;
11
+
12
+ const h1 = wrapper . find ( 'h1' )
13
+ expect ( h1 . text ( ) ) . toBe ( 'My Title' )
14
+ } ) ;
15
+
16
+ } )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import PropTypes from 'prop-types' ;
3
+
4
+ const Test = props =>
5
+ (
6
+ < div >
7
+ < section className = "top-header" >
8
+ < h1 >
9
+ { props . title }
10
+ </ h1 >
11
+ </ section >
12
+ </ div >
13
+ ) ;
14
+
15
+ Test . propTypes = {
16
+ title : PropTypes . string . isRequired
17
+ } ;
18
+
19
+ export default Test ;
You can’t perform that action at this time.
0 commit comments