From 1afa41477d487ef4c51770f25b67e91d6417428c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 29 Nov 2016 10:56:58 -0800 Subject: [PATCH] Don't use this.skip() since after hooks won't be run --- spec/api-browser-window-spec.js | 6 +++--- spec/api-clipboard-spec.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 3c498410c..e7f15dfcd 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -523,7 +523,7 @@ describe('browser-window module', function () { describe('BrowserWindow.setAppDetails(options)', function () { it('supports setting the app details', function () { - if (process.platform !== 'win32') return this.skip() + if (process.platform !== 'win32') return const iconPath = path.join(fixtures, 'assets', 'icon.ico') @@ -660,7 +660,7 @@ describe('browser-window module', function () { describe('"zoomToPageWidth" option', function () { it('sets the window width to the page width when used', function () { - if (process.platform !== 'darwin') return this.skip() + if (process.platform !== 'darwin') return w.destroy() w = new BrowserWindow({ @@ -1723,7 +1723,7 @@ describe('browser-window module', function () { describe('previewFile', function () { it('opens the path in Quick Look on macOS', function () { - if (process.platform !== 'darwin') return this.skip() + if (process.platform !== 'darwin') return assert.doesNotThrow(function () { w.previewFile(__filename) diff --git a/spec/api-clipboard-spec.js b/spec/api-clipboard-spec.js index f0d730d7b..2b4aac9fa 100644 --- a/spec/api-clipboard-spec.js +++ b/spec/api-clipboard-spec.js @@ -87,7 +87,7 @@ describe('clipboard module', function () { describe('clipboard.read/writeFindText(text)', function () { it('reads and write text to the find pasteboard', function () { - if (process.platform !== 'darwin') return this.skip() + if (process.platform !== 'darwin') return clipboard.writeFindText('find this') assert.equal(clipboard.readFindText(), 'find this')