File tree 4 files changed +23
-6
lines changed
4 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " react-grid-layout-between" ,
3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
+ "scripts" : {
6
+ "start" : " react-scripts start" ,
7
+ "build" : " react-scripts build" ,
8
+ "test" : " react-scripts test" ,
9
+ "eject" : " react-scripts eject"
10
+ },
5
11
"dependencies" : {
6
12
"lodash" : " ^4.17.13" ,
7
13
"mockjs" : " ^1.1.0" ,
11
17
"react-dom" : " ^16.8.6" ,
12
18
"react-scripts" : " 3.4.1"
13
19
},
14
- "scripts" : {
15
- "start" : " react-scripts start" ,
16
- "build" : " react-scripts build" ,
17
- "test" : " react-scripts test" ,
18
- "eject" : " react-scripts eject"
19
- },
20
20
"eslintConfig" : {
21
21
"extends" : " react-app"
22
22
},
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
3
import App from './App' ;
4
+ import { collision } from './utils/collision' ;
4
5
5
6
it ( 'renders without crashing' , ( ) => {
6
7
const div = document . createElement ( 'div' ) ;
7
8
ReactDOM . render ( < App /> , div ) ;
8
9
ReactDOM . unmountComponentAtNode ( div ) ;
9
10
} ) ;
11
+
12
+ test ( 'collision interface' , ( ) => {
13
+ const a = {
14
+ gridx : 0 ,
15
+ gridy : 0 ,
16
+ width : 2 ,
17
+ height : 1
18
+ } ;
19
+ const b = {
20
+ gridx : 1 ,
21
+ gridy : 0 ,
22
+ width : 1 ,
23
+ height : 1
24
+ } ;
25
+ expect ( collision ( a , b ) ) . toEqual ( true ) ;
26
+ } ) ;
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments