From 079d4d05e8e7773ec226bc3ca2b7e4f907ec48c9 Mon Sep 17 00:00:00 2001 From: Tais Massaro Date: Wed, 1 Sep 2021 20:49:40 +0200 Subject: [PATCH] test(tldraw): use jest .todo instead of TODO comments --- package.json | 2 +- .../session/sessions/arrow/arrow.session.spec.ts | 8 ++------ .../sessions/translate/translate.session.spec.ts | 10 ++-------- packages/tldraw/src/state/tlstate.spec.ts | 16 ++++------------ yarn.lock | 9 +++++++++ 5 files changed, 18 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 46f4482fd..9e140df8a 100644 --- a/package.json +++ b/package.json @@ -113,4 +113,4 @@ "\\+(.*)": "/packages/core/src/$1" } } -} \ No newline at end of file +} diff --git a/packages/tldraw/src/state/session/sessions/arrow/arrow.session.spec.ts b/packages/tldraw/src/state/session/sessions/arrow/arrow.session.spec.ts index d8ce73242..606198591 100644 --- a/packages/tldraw/src/state/session/sessions/arrow/arrow.session.spec.ts +++ b/packages/tldraw/src/state/session/sessions/arrow/arrow.session.spec.ts @@ -159,12 +159,8 @@ describe('Arrow session', () => { expect(tlstate.getShape('arrow1').handles.end.point).toStrictEqual([85, 85]) }) - it('updates the arrow when bound on both sides', () => { - // TODO - }) + it.todo('updates the arrow when bound on both sides') - it('snaps the bend to zero when dragging the bend handle toward the center', () => { - // TODO - }) + it.todo('snaps the bend to zero when dragging the bend handle toward the center') }) }) diff --git a/packages/tldraw/src/state/session/sessions/translate/translate.session.spec.ts b/packages/tldraw/src/state/session/sessions/translate/translate.session.spec.ts index 2706ba5e1..cf953eeda 100644 --- a/packages/tldraw/src/state/session/sessions/translate/translate.session.spec.ts +++ b/packages/tldraw/src/state/session/sessions/translate/translate.session.spec.ts @@ -173,13 +173,7 @@ describe('Brush session', () => { // expect(tlstate.getShape('arrow1').handles.start.bindingId).toBe(undefined) }) - // it('clones a shape with a parent shape', () => { - // tlstate.loadDocument(mockDocument) - // // TODO - // }) + // it.todo('clones a shape with a parent shape') - // it('clones a shape with children', () => { - // tlstate.loadDocument(mockDocument) - // // TODO - // }) + // it.todo('clones a shape with children') }) diff --git a/packages/tldraw/src/state/tlstate.spec.ts b/packages/tldraw/src/state/tlstate.spec.ts index 12ee2aa4a..1db919b75 100644 --- a/packages/tldraw/src/state/tlstate.spec.ts +++ b/packages/tldraw/src/state/tlstate.spec.ts @@ -115,21 +115,13 @@ describe('TLDrawState', () => { expect(tlstate.appState.status.current).toBe('idle') }) - it('deletes shapes if cancelled during creating', () => { - // TODO - }) + it.todo('deletes shapes if cancelled during creating') - it('deletes shapes on undo after creating', () => { - // TODO - }) + it.todo('deletes shapes on undo after creating') - it('re-creates shapes on undo after creating', () => { - // TODO - }) + it.todo('re-creates shapes on undo after creating') - it('selects all', () => { - // TODO - }) + it.todo('selects all') // Single click on a selected shape to select just that shape diff --git a/yarn.lock b/yarn.lock index 108c1c66e..3de3deb68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2726,6 +2726,15 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^8.0.0" +"@tldraw/core@^0.0.53": + version "0.0.53" + resolved "https://registry.yarnpkg.com/@tldraw/core/-/core-0.0.53.tgz#2db2b27df441169e452e0aa07570adca8b06b582" + integrity sha512-hxZIUR3Sm320tvGW5lWEKfw1QJhe6mJu7IrG5ka5G3slusqaY3cQY9EafFqH07yEXul2MU2RENIQus7fh+Gwcg== + dependencies: + deepmerge "^4.2.2" + ismobilejs "^1.1.1" + react-use-gesture "^9.1.3" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"