From ecfb152946923bf5601fcaabecf55de822726ce4 Mon Sep 17 00:00:00 2001 From: Budi Irawan Date: Sat, 27 Jul 2019 08:24:37 +1000 Subject: [PATCH] fix failing test --- test/dash.test.ts | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/test/dash.test.ts b/test/dash.test.ts index 617a354..e41ebdb 100644 --- a/test/dash.test.ts +++ b/test/dash.test.ts @@ -8,7 +8,10 @@ suite('Dash Tests', () => { const dash = new Dash('darwin', dashOptionExactDocsetEnabled); const uri = dash.getCommand('size', ['css', 'less']); - assert.equal(uri, 'open -g "dash-plugin://query=size&keys=exact:css,exact:less"'); + assert.equal( + uri, + 'open -g "dash-plugin://query=size&keys=exact:css,exact:less"' + ); }); test('Get command with no keys for macOS', () => { @@ -24,7 +27,7 @@ suite('Dash Tests', () => { assert.equal( uri, - 'start dash-plugin:// && start dash-plugin://query=size^&keys=exact:css,exact:less' + 'cmd.exe /c start "" dash-plugin://query=size^&keys=exact:css,exact:less' ); }); @@ -32,14 +35,17 @@ suite('Dash Tests', () => { const dash = new Dash('win32', dashOptionExactDocsetEnabled); const uri = dash.getCommand('size'); - assert.equal(uri, 'start dash-plugin:// && start dash-plugin://query=size'); + assert.equal(uri, 'cmd.exe /c start "" dash-plugin://query=size'); }); test('Get command with keys for Linux', () => { const dash = new Dash('linux', dashOptionExactDocsetEnabled); const uri = dash.getCommand('size', ['css', 'less']); - assert.equal(uri, 'zeal "dash-plugin://query=size&keys=exact:css,exact:less"'); + assert.equal( + uri, + 'zeal "dash-plugin://query=size&keys=exact:css,exact:less"' + ); }); test('Get command with no keys for Linux', () => { @@ -49,20 +55,6 @@ suite('Dash Tests', () => { assert.equal(uri, 'zeal "dash-plugin://query=size"'); }); - test('Get keys with exist docset', () => { - const dash = new Dash('darwin', dashOptionExactDocsetEnabled); - const keys = dash.getKeys(['css', 'less']); - - assert.equal(keys, 'exact:css,exact:less'); - }); - - test('Get keys with empty docset', () => { - const dash = new Dash('darwin', dashOptionExactDocsetEnabled); - const keys = dash.getKeys([]); - - assert.equal(keys, ''); - }); - test('Exact docset disabled', () => { const dashOptionExactDocsetDisabled: DashOption = { exactDocset: false };