aboutsummaryrefslogtreecommitdiff
path: root/test/shared/Settings.test.ts
diff options
context:
space:
mode:
authorShin'ya UEOKA <ueokande@i-beam.org>2019-10-05 02:06:02 +0000
committerShin'ya UEOKA <ueokande@i-beam.org>2019-10-06 12:58:59 +0000
commit574692551a27ea56660bf2061daeaa0d34beaff4 (patch)
tree414a7f1de8dfb24af45d7e392b72549bc67ad48a /test/shared/Settings.test.ts
parent2116ac90a6dfdb0910d7ad2896f70a052aa635cc (diff)
Make Properties class
Diffstat (limited to 'test/shared/Settings.test.ts')
-rw-r--r--test/shared/Settings.test.ts31
1 files changed, 3 insertions, 28 deletions
diff --git a/test/shared/Settings.test.ts b/test/shared/Settings.test.ts
index ed791a1..6360bab 100644
--- a/test/shared/Settings.test.ts
+++ b/test/shared/Settings.test.ts
@@ -1,33 +1,8 @@
import * as settings from '../../src/shared/Settings';
-import { expect } from 'chai';
+import {expect} from 'chai';
describe('Settings', () => {
- describe('#propertiesValueOf', () => {
- it('returns with default properties by empty settings', () => {
- let props = settings.propertiesValueOf({});
- expect(props).to.deep.equal({
- hintchars: "abcdefghijklmnopqrstuvwxyz",
- smoothscroll: false,
- complete: "sbh"
- })
- });
-
- it('returns properties by valid settings', () => {
- let props = settings.propertiesValueOf({
- hintchars: "abcdefgh",
- smoothscroll: false,
- complete: "sbh"
- });
-
- expect(props).to.deep.equal({
- hintchars: "abcdefgh",
- smoothscroll: false,
- complete: "sbh"
- });
- });
- });
-
describe('#blacklistValueOf', () => {
it('returns empty array by empty settings', () => {
let blacklist = settings.blacklistValueOf([]);
@@ -70,7 +45,7 @@ describe('Settings', () => {
expect({
keymaps: x.keymaps.toJSON(),
search: x.search.toJSON(),
- properties: x.properties,
+ properties: x.properties.toJSON(),
blacklist: x.blacklist,
}).to.deep.equal({
keymaps: {},
@@ -92,7 +67,7 @@ describe('Settings', () => {
it('sets default settings', () => {
let value = settings.valueOf({});
expect(value.keymaps.toJSON()).to.not.be.empty;
- expect(value.properties).to.not.be.empty;
+ expect(value.properties.toJSON()).to.not.be.empty;
expect(value.search.defaultEngine).to.be.a('string');
expect(value.search.engines).to.be.an('object');
expect(value.blacklist).to.be.empty;