kopia lustrzana https://github.com/Tldraw/Tldraw
39 wiersze
454 B
TypeScript
39 wiersze
454 B
TypeScript
import { TestApp } from '../TestApp'
|
|
|
|
let app: TestApp
|
|
|
|
beforeEach(() => {
|
|
app = new TestApp()
|
|
})
|
|
|
|
it('Sets the brush', () => {
|
|
expect(app.brush).toEqual(null)
|
|
|
|
app.setBrush({ x: 0, y: 0, w: 100, h: 100 })
|
|
|
|
expect(app.brush).toMatchObject({
|
|
x: 0,
|
|
y: 0,
|
|
w: 100,
|
|
h: 100,
|
|
})
|
|
|
|
app.undo()
|
|
|
|
expect(app.brush).toEqual({
|
|
x: 0,
|
|
y: 0,
|
|
w: 100,
|
|
h: 100,
|
|
})
|
|
|
|
app.redo()
|
|
|
|
expect(app.brush).toEqual({
|
|
x: 0,
|
|
y: 0,
|
|
w: 100,
|
|
h: 100,
|
|
})
|
|
})
|