kopia lustrzana https://github.com/Tldraw/Tldraw
26 wiersze
589 B
TypeScript
26 wiersze
589 B
TypeScript
import { createTLStore } from '../config/createTLStore'
|
|
import { Editor } from '../editor/Editor'
|
|
|
|
let editor: Editor
|
|
|
|
beforeEach(() => {
|
|
editor = new Editor({
|
|
shapeUtils: [],
|
|
bindingUtils: [],
|
|
tools: [],
|
|
store: createTLStore({ shapeUtils: [] }),
|
|
getContainer: () => document.body,
|
|
})
|
|
})
|
|
|
|
describe('user', () => {
|
|
it('gets a user with the correct color', () => {
|
|
expect(editor.user.getIsDarkMode()).toBe(false)
|
|
})
|
|
|
|
it('gets a user with the correct', () => {
|
|
editor.user.updateUserPreferences({ isDarkMode: true })
|
|
expect(editor.user.getIsDarkMode()).toBe(true)
|
|
})
|
|
})
|