aboutsummaryrefslogtreecommitdiff
path: root/test/content/domains
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 11:10:36 +0900
committerGitHub <noreply@github.com>2019-12-22 11:10:36 +0900
commitb1a6f374dca078dee2406ebe049715b826e37ca2 (patch)
tree5367c48648e2018f55f12d847baba94559e10040 /test/content/domains
parentb2dcdedad729ff7087867da50e20578f9fc8fb29 (diff)
parentda72c2ddd916d79d134662e3985b53a4ac78af7a (diff)
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'test/content/domains')
-rw-r--r--test/content/domains/KeySequence.test.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/content/domains/KeySequence.test.ts b/test/content/domains/KeySequence.test.ts
index bc16189..5df5217 100644
--- a/test/content/domains/KeySequence.test.ts
+++ b/test/content/domains/KeySequence.test.ts
@@ -5,7 +5,7 @@ import Key from "../../../src/shared/settings/Key";
describe("KeySequence", () => {
describe('#push', () => {
it('append a key to the sequence', () => {
- let seq = new KeySequence([]);
+ const seq = new KeySequence([]);
seq.push(Key.fromMapKey('g'));
seq.push(Key.fromMapKey('<S-U>'));
@@ -17,7 +17,7 @@ describe("KeySequence", () => {
describe('#startsWith', () => {
it('returns true if the key sequence starts with param', () => {
- let seq = new KeySequence([
+ const seq = new KeySequence([
Key.fromMapKey('g'),
Key.fromMapKey('<S-U>'),
]);
@@ -39,7 +39,7 @@ describe("KeySequence", () => {
});
it('returns true if the empty sequence starts with an empty sequence', () => {
- let seq = new KeySequence([]);
+ const seq = new KeySequence([]);
expect(seq.startsWith(new KeySequence([]))).to.be.true;
expect(seq.startsWith(new KeySequence([
@@ -102,7 +102,7 @@ describe("KeySequence", () => {
describe('#trimNumericPrefix', () => {
it('removes numeric prefix', () => {
- let seq = new KeySequence([
+ const seq = new KeySequence([
new Key({ key: '1' }), new Key({ key: '0' }) ,
new Key({ key: 'g' }), new Key({ key: 'g' }) , new Key({ key: '3' }) ,
]).trimNumericPrefix();
@@ -110,14 +110,14 @@ describe("KeySequence", () => {
});
it('returns empty if keys contains only digis', () => {
- let seq = new KeySequence([
+ const seq = new KeySequence([
new Key({ key: '1' }), new Key({ key: '0' }) ,
]).trimNumericPrefix();
expect(seq.trimNumericPrefix().keys).to.be.empty;
});
it('returns itself if no numeric prefix', () => {
- let seq = new KeySequence([
+ const seq = new KeySequence([
new Key({ key: 'g' }), new Key({ key: 'g' }) , new Key({ key: '3' }) ,
]).trimNumericPrefix();
@@ -144,14 +144,14 @@ describe("KeySequence", () => {
describe('#fromMapKeys', () => {
it('returns mapped keys for Shift+Esc', () => {
- let keys = KeySequence.fromMapKeys('<S-Esc>').keys;
+ const keys = KeySequence.fromMapKeys('<S-Esc>').keys;
expect(keys).to.have.lengthOf(1);
expect(keys[0].key).to.equal('Esc');
expect(keys[0].shift).to.be.true;
});
it('returns mapped keys for a<C-B><A-C>d<M-e>', () => {
- let keys = KeySequence.fromMapKeys('a<C-B><A-C>d<M-e>').keys;
+ const keys = KeySequence.fromMapKeys('a<C-B><A-C>d<M-e>').keys;
expect(keys).to.have.lengthOf(5);
expect(keys[0].key).to.equal('a');
expect(keys[1].ctrl).to.be.true;