Make Properties class
This commit is contained in:
parent
2116ac90a6
commit
574692551a
16 changed files with 179 additions and 236 deletions
30
test/shared/settings/Properties.test.ts
Normal file
30
test/shared/settings/Properties.test.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import Properties from '../../../src/shared/settings/Properties';
|
||||
import { expect } from 'chai';
|
||||
|
||||
describe('Properties', () => {
|
||||
describe('#propertiesValueOf', () => {
|
||||
it('returns with default properties by empty settings', () => {
|
||||
let props = Properties.fromJSON({});
|
||||
expect(props).to.deep.equal({
|
||||
hintchars: "abcdefghijklmnopqrstuvwxyz",
|
||||
smoothscroll: false,
|
||||
complete: "sbh"
|
||||
})
|
||||
});
|
||||
|
||||
it('returns properties by valid settings', () => {
|
||||
let props = Properties.fromJSON({
|
||||
hintchars: "abcdefgh",
|
||||
smoothscroll: false,
|
||||
complete: "sbh"
|
||||
});
|
||||
|
||||
expect(props).to.deep.equal({
|
||||
hintchars: "abcdefgh",
|
||||
smoothscroll: false,
|
||||
complete: "sbh"
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in a new issue