Simplify spellcheck download URL, disable spellcheck in most windows
This commit is contained in:
parent
ab9d33cf1a
commit
1c43e7501c
6 changed files with 61 additions and 57 deletions
33
ts/test-node/app/updateDefaultSession_test.ts
Normal file
33
ts/test-node/app/updateDefaultSession_test.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright 2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as sinon from 'sinon';
|
||||
import { session } from 'electron';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { updateDefaultSession } from '../../../app/updateDefaultSession';
|
||||
|
||||
describe('updateDefaultSession', () => {
|
||||
let sandbox: sinon.SinonSandbox;
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.createSandbox();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
sandbox.restore();
|
||||
});
|
||||
|
||||
it('sets the spellcheck URL', () => {
|
||||
const sesh = session.fromPartition(uuid());
|
||||
const stub = sandbox.stub(sesh, 'setSpellCheckerDictionaryDownloadURL');
|
||||
|
||||
updateDefaultSession(sesh);
|
||||
|
||||
sinon.assert.calledOnce(stub);
|
||||
sinon.assert.calledWith(
|
||||
stub,
|
||||
`https://updates.signal.org/desktop/hunspell_dictionaries/${process.versions.electron}/`
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue