test(tldraw): fix test names

pull/71/head
Tais Massaro 2021-09-01 21:12:56 +02:00
rodzic 079d4d05e8
commit 44cca2ddd6
12 zmienionych plików z 15 dodań i 15 usunięć

Wyświetl plik

@ -1,8 +1,8 @@
import * as React from 'react'
import { Menu } from './menu'
import { mockDocument, renderWithContext } from '~test'
import { renderWithContext } from '~test'
describe('menu menu', () => {
describe('menu', () => {
test('mounts component without crashing', () => {
renderWithContext(<Menu />)
})

Wyświetl plik

@ -21,7 +21,7 @@ describe('Align command', () => {
expect(tlstate.getShape('rect2').point).toEqual([100, 0])
})
it('aligns left', () => {
it('aligns top', () => {
tlstate.loadDocument(mockDocument)
tlstate.selectAll()
tlstate.align(AlignType.Top)

Wyświetl plik

@ -1,7 +1,7 @@
import { TLDrawState } from '~state'
import { mockDocument } from '~test'
describe('Duplicate page', () => {
describe('Duplicate page command', () => {
const tlstate = new TLDrawState()
it('does, undoes and redoes command', () => {

Wyświetl plik

@ -2,7 +2,7 @@ import { TLDrawState } from '~state'
import { mockDocument } from '~test'
import type { RectangleShape } from '~types'
describe('Stretch command', () => {
describe('Flip command', () => {
const tlstate = new TLDrawState()
it('does, undoes and redoes command', () => {
@ -29,7 +29,7 @@ describe('Stretch command', () => {
expect(tlstate.getShape<RectangleShape>('rect1').point).toStrictEqual([100, 0])
})
it('distributes vertically', () => {
it('flips vertically', () => {
tlstate.loadDocument(mockDocument)
tlstate.select('rect1', 'rect2')
tlstate.flipVertical()

Wyświetl plik

@ -1,7 +1,7 @@
import { TLDrawState } from '~state'
import { mockDocument } from '~test'
describe('Edit page', () => {
describe('Rename page command', () => {
const tlstate = new TLDrawState()
it('does, undoes and redoes command', () => {

Wyświetl plik

@ -30,7 +30,7 @@ describe('Stretch command', () => {
expect(tlstate.getShape<RectangleShape>('rect2').size).toStrictEqual([200, 100])
})
it('distributes horizontally', () => {
it('stretches horizontally', () => {
tlstate.loadDocument(mockDocument)
tlstate.select('rect1', 'rect2')
tlstate.stretch(StretchType.Horizontal)
@ -41,7 +41,7 @@ describe('Stretch command', () => {
expect(tlstate.getShape<RectangleShape>('rect2').size).toStrictEqual([200, 100])
})
it('distributes vertically', () => {
it('stretches vertically', () => {
tlstate.loadDocument(mockDocument)
tlstate.select('rect1', 'rect2')
tlstate.stretch(StretchType.Vertical)

Wyświetl plik

@ -3,7 +3,7 @@ import { TLDrawState } from '~state'
import { mockDocument } from '~test'
import { ArrowShape, Decoration, TLDrawShape } from '~types'
describe('Handle command', () => {
describe('Toggle decoration command', () => {
const tlstate = new TLDrawState()
it('does, undoes and redoes command', () => {

Wyświetl plik

@ -4,7 +4,7 @@ import { Utils } from '@tldraw/core'
const doc = Utils.deepClone(mockDocument)
describe('Move command', () => {
describe('Update command', () => {
const tlstate = new TLDrawState()
it('does, undoes and redoes command', () => {

Wyświetl plik

@ -2,7 +2,7 @@ import { TLDrawState } from '~state'
import { mockDocument } from '~test'
import { ColorStyle, DashStyle, SizeStyle, TLDrawShapeType, TLDrawStatus } from '~types'
describe('Transform session', () => {
describe('Draw session', () => {
const tlstate = new TLDrawState()
it('begins, updates and completes session', () => {

Wyświetl plik

@ -2,7 +2,7 @@ import { TLDrawState } from '~state'
import { mockDocument } from '~test'
import { TLDrawStatus } from '~types'
describe('Brush session', () => {
describe('Rotate session', () => {
const tlstate = new TLDrawState()
it('begins, updates and completes session', () => {

Wyświetl plik

@ -2,7 +2,7 @@ import { TLDrawState } from '~state'
import { mockDocument } from '~test'
import { ArrowShape, TLDrawShapeType, TLDrawStatus } from '~types'
describe('Brush session', () => {
describe('Translate session', () => {
const tlstate = new TLDrawState()
it('begins, updates and completes session', () => {

Wyświetl plik

@ -119,7 +119,7 @@ describe('TLDrawState', () => {
it.todo('deletes shapes on undo after creating')
it.todo('re-creates shapes on undo after creating')
it.todo('re-creates shapes on redo after creating')
it.todo('selects all')