fix: dark mode not working in editors (#1773)

This commit is contained in:
Aman Harwara
2022-10-10 21:47:57 +05:30
committed by GitHub
parent dcb8024deb
commit 27d2c95b5b
30 changed files with 127 additions and 190 deletions

View File

@@ -1,16 +1,15 @@
/* eslint-disable no-unused-expressions */
/* eslint-disable no-undef */
import { BaseItemCounts } from './lib/Applications.js'
import * as Factory from './lib/factory.js'
chai.use(chaiAsPromised)
const expect = chai.expect
describe('auth fringe cases', () => {
const BASE_ITEM_COUNT = ['default items key', 'user prefs'].length
const createContext = async () => {
const application = await Factory.createInitAppWithFakeCrypto()
return {
expectedItemCount: BASE_ITEM_COUNT,
expectedItemCount: BaseItemCounts.DefaultItems,
application: application,
email: UuidGenerator.GenerateUuid(),
password: UuidGenerator.GenerateUuid(),
@@ -100,9 +99,13 @@ describe('auth fringe cases', () => {
expect(newApplication.itemManager.getDisplayableNotes().length).to.equal(2)
expect(newApplication.itemManager.getDisplayableNotes().find((n) => n.uuid === firstVersionOfNote.uuid).text).to.equal(staleText)
expect(
newApplication.itemManager.getDisplayableNotes().find((n) => n.uuid === firstVersionOfNote.uuid).text,
).to.equal(staleText)
const conflictedCopy = newApplication.itemManager.getDisplayableNotes().find((n) => n.uuid !== firstVersionOfNote.uuid)
const conflictedCopy = newApplication.itemManager
.getDisplayableNotes()
.find((n) => n.uuid !== firstVersionOfNote.uuid)
expect(conflictedCopy.text).to.equal(serverText)
expect(conflictedCopy.duplicate_of).to.equal(firstVersionOfNote.uuid)
await Factory.safeDeinit(newApplication)