From 55880e036b8d9659cad0e7506a2d1f2c170420d5 Mon Sep 17 00:00:00 2001 From: 1f604 <1f604@users.noreply.github.com> Date: Wed, 22 Feb 2017 10:34:12 +0000 Subject: [PATCH] all tests passing --- src/extension.ts | 3 +-- src/httpsConnection/httpsRequest.ts | 2 +- test/extension.test.ts | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index b928a18..c023ab2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -128,8 +128,7 @@ function highlight(){ prefix = lng; } editor = vscode.window.activeTextEditor; - doc = editor.document; - + doc = editor.document; vscode.commands.executeCommand(close_other_editor_command_id) .then(() => vscode.commands.executeCommand(markdown_preview_command_id)) .then(() => {}, (e) => console.error(e)); diff --git a/src/httpsConnection/httpsRequest.ts b/src/httpsConnection/httpsRequest.ts index a59c021..982ed64 100644 --- a/src/httpsConnection/httpsRequest.ts +++ b/src/httpsConnection/httpsRequest.ts @@ -5,7 +5,7 @@ module.exports = function(data,callback) { var options = { host: 'innoflow.herokuapp.com', port: 443, - path: '/api/innovation', + path: '/api/innovations', method: 'POST', headers: { "Content-Type": "application/json" diff --git a/test/extension.test.ts b/test/extension.test.ts index 4bfd503..1fe44f0 100644 --- a/test/extension.test.ts +++ b/test/extension.test.ts @@ -94,7 +94,7 @@ suite("Extension Function Tests", () => { }); test("should call login without errors", async ( ) => { - assert.ok(await vscode.commands.executeCommand('extension.login', "a", "b")); + assert.ok(await vscode.commands.executeCommand('extension.login', "jack@gmail.com", "1234567890")); }); test("should call highlight without errors", async ( ) => { @@ -109,8 +109,8 @@ suite("Extension Function Tests", () => { test("API calls to server should return status code 200", function (done) { var data = JSON.stringify({ - email : "userEmail", - password : "userPassword", + email : "jack@gmail.com", + password : "1234567890", code : Buffer.from("doc.getText()").toString('base64') }); var httpsRequest = require('../src/httpsConnection/httpsRequest.js');