diff --git a/package-lock.json b/package-lock.json index cd66b3d4..b1309a1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -191,6 +191,15 @@ } } }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -1767,24 +1776,15 @@ } }, "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", "dev": true, "requires": { - "agent-base": "^4.3.0", + "agent-base": "^4.1.0", "debug": "^3.1.0" }, "dependencies": { - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -1795,9 +1795,9 @@ } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true } } diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index cf4dfd64..fb1b9406 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -17,15 +17,6 @@ const {FollowState} = require('@atom/teletype-client') const FakeBufferProxy = require('./helpers/fake-buffer-proxy') const BufferBinding = require('../lib/buffer-binding') -/* -We are currently checking if teletype is trying to build against the dev version of atom which uses electron 5. -This is because there is a slight change in electron 5s API and some of the assertions in this tests need to be -changed. The stable and beta version of atom still uses electron 4 inorder to support both electron -versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against -electron 5, these assertions will be simplified. -*/ -const isDevBuild = atom.getAppName().toLowerCase().indexOf('atom dev') > -1 - suite('EditorBinding', function () { if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS) @@ -107,31 +98,20 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(10, 0), head: Point(11, 4)}, - {tail: Point(20, 5), head: Point(20, 0)}, - {tail: Point(3, 0), head: Point(4, 2)}, - {tail: Point(6, 0), head: Point(5, 0)} - ] - ) - } - assert.deepEqual( cursorDecoratedRanges, [ - {tail: {row: 3, column: 0}, head: {row: 4, column: 2}}, - {tail: {row: 6, column: 0}, head: {row: 5, column: 0}}, - {tail: {row: 10, column: 0}, head: {row: 11, column: 4}}, - {tail: {row: 20, column: 5}, head: {row: 20, column: 0}} + {tail: Point(10, 0), head: Point(11, 4)}, + {tail: Point(20, 5), head: Point(20, 0)}, + {tail: Point(3, 0), head: Point(4, 2)}, + {tail: Point(6, 0), head: Point(5, 0)} ] ) editor.setSelectedBufferRanges([ [[0, 0], [0, 4]] ]) + assert.deepEqual( editorProxy.selections, { @@ -163,22 +143,12 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(10, 0), head: Point(11, 4)}, - {tail: Point(20, 0), head: Point(20, 5)}, - {tail: Point(3, 0), head: Point(4, 2)} - ] - ) - } assert.deepEqual( cursorDecoratedRanges, [ - {tail: {row: 3, column: 0}, head: {row: 4, column: 2}}, - {tail: {row: 10, column: 0}, head: {row: 11, column: 4}}, - {tail: {row: 20, column: 0}, head: {row: 20, column: 5}} + {tail: Point(10, 0), head: Point(11, 4)}, + {tail: Point(20, 0), head: Point(20, 5)}, + {tail: Point(3, 0), head: Point(4, 2)} ] ) @@ -266,21 +236,11 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(0, 3), head: Point(0, 3)}, - {tail: Point(0, 6), head: Point(0, 6)} - ] - ) - } - assert.deepEqual( cursorDecoratedRanges, [ - {tail: {row: 0, column: 6}, head: {row: 0, column: 6}}, - {tail: {row: 0, column: 3}, head: {row: 0, column: 3}} + {tail: Point(0, 3), head: Point(0, 3)}, + {tail: Point(0, 6), head: Point(0, 6)} ] ) })