Browse Source

test(tldraw): use jest .todo instead of TODO comments

main
Tais Massaro 4 years ago
parent
commit
079d4d05e8

+ 1
- 1
package.json View File

@@ -113,4 +113,4 @@
113 113
       "\\+(.*)": "<rootDir>/packages/core/src/$1"
114 114
     }
115 115
   }
116
-}
116
+}

+ 2
- 6
packages/tldraw/src/state/session/sessions/arrow/arrow.session.spec.ts View File

@@ -159,12 +159,8 @@ describe('Arrow session', () => {
159 159
       expect(tlstate.getShape<ArrowShape>('arrow1').handles.end.point).toStrictEqual([85, 85])
160 160
     })
161 161
 
162
-    it('updates the arrow when bound on both sides', () => {
163
-      // TODO
164
-    })
162
+    it.todo('updates the arrow when bound on both sides')
165 163
 
166
-    it('snaps the bend to zero when dragging the bend handle toward the center', () => {
167
-      // TODO
168
-    })
164
+    it.todo('snaps the bend to zero when dragging the bend handle toward the center')
169 165
   })
170 166
 })

+ 3
- 9
packages/tldraw/src/state/session/sessions/translate/translate.session.spec.ts View File

@@ -173,13 +173,7 @@ describe('Brush session', () => {
173 173
     // expect(tlstate.getShape<ArrowShape>('arrow1').handles.start.bindingId).toBe(undefined)
174 174
   })
175 175
 
176
-  // it('clones a shape with a parent shape', () => {
177
-  //   tlstate.loadDocument(mockDocument)
178
-  //   // TODO
179
-  // })
180
-
181
-  // it('clones a shape with children', () => {
182
-  //   tlstate.loadDocument(mockDocument)
183
-  //   // TODO
184
-  // })
176
+  // it.todo('clones a shape with a parent shape')
177
+
178
+  // it.todo('clones a shape with children')
185 179
 })

+ 4
- 12
packages/tldraw/src/state/tlstate.spec.ts View File

@@ -115,21 +115,13 @@ describe('TLDrawState', () => {
115 115
       expect(tlstate.appState.status.current).toBe('idle')
116 116
     })
117 117
 
118
-    it('deletes shapes if cancelled during creating', () => {
119
-      // TODO
120
-    })
118
+    it.todo('deletes shapes if cancelled during creating')
121 119
 
122
-    it('deletes shapes on undo after creating', () => {
123
-      // TODO
124
-    })
120
+    it.todo('deletes shapes on undo after creating')
125 121
 
126
-    it('re-creates shapes on undo after creating', () => {
127
-      // TODO
128
-    })
122
+    it.todo('re-creates shapes on undo after creating')
129 123
 
130
-    it('selects all', () => {
131
-      // TODO
132
-    })
124
+    it.todo('selects all')
133 125
 
134 126
     // Single click on a selected shape to select just that shape
135 127
 

+ 9
- 0
yarn.lock View File

@@ -2726,6 +2726,15 @@
2726 2726
     "@babel/runtime" "^7.12.5"
2727 2727
     "@testing-library/dom" "^8.0.0"
2728 2728
 
2729
+"@tldraw/core@^0.0.53":
2730
+  version "0.0.53"
2731
+  resolved "https://registry.yarnpkg.com/@tldraw/core/-/core-0.0.53.tgz#2db2b27df441169e452e0aa07570adca8b06b582"
2732
+  integrity sha512-hxZIUR3Sm320tvGW5lWEKfw1QJhe6mJu7IrG5ka5G3slusqaY3cQY9EafFqH07yEXul2MU2RENIQus7fh+Gwcg==
2733
+  dependencies:
2734
+    deepmerge "^4.2.2"
2735
+    ismobilejs "^1.1.1"
2736
+    react-use-gesture "^9.1.3"
2737
+
2729 2738
 "@tootallnate/once@1":
2730 2739
   version "1.1.2"
2731 2740
   resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"

Loading…
Cancel
Save