/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/editor/src/lib/test/user.test.ts
25 строк
610 B
alex
Elbow arrows (#5572)
07 май 2025, 18:23
Не верифицирован
07 май 2025, 18:23
2c1fb1a
Код
Авторство
О чём код?
import { createTLStore } from '../config/createTLStore' import { Editor } from '../editor/Editor' let editor: Editor beforeEach(() => { editor = new Editor({ shapeUtils: [], bindingUtils: [], tools: [], store: createTLStore({ shapeUtils: [], bindingUtils: [] }), 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({ colorScheme: 'dark' }) expect(editor.user.getIsDarkMode()).toBe(true) }) })