From 1e562029acddf90ad8e389730a5ba6cf002fe704 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Mon, 1 Apr 2024 19:42:21 -0400 Subject: [PATCH] Skip platform-specific tests as context demands --- test/helpers/macos/applescript.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/helpers/macos/applescript.js b/test/helpers/macos/applescript.js index 2efa6d7..5187cdb 100644 --- a/test/helpers/macos/applescript.js +++ b/test/helpers/macos/applescript.js @@ -12,8 +12,16 @@ const { } = require('../../../lib/helpers/macos/applescript.js'); const { parseCodePoints } = require('../../../lib/helpers/macos/parseCodePoints.js'); const { keyCodeCommand } = require('../../../lib/helpers/macos/keyCodeCommand.js'); +const IS_MACOS = require('os').platform() === 'darwin'; suite('helpers/macos/applescript', () => { + suiteSetup(function() { + if (!IS_MACOS) { + this.skip(); + return; + } + }); + suite('parseCodePoints', () => { test('space', () => { assert.deepEqual(parseCodePoints([' ']), keyCodeCommand(['space'], []));