From d85d82e701fc301cabf795391f2c6eb5fcf4101e Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 21 Jul 2023 13:21:35 +0200 Subject: [PATCH] test: make sure tests run on Linux --- test/spec/support/compile-config-spec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/spec/support/compile-config-spec.js b/test/spec/support/compile-config-spec.js index cf0a524..33b7540 100644 --- a/test/spec/support/compile-config-spec.js +++ b/test/spec/support/compile-config-spec.js @@ -1,3 +1,5 @@ +const os = require('os'); + const { expect } = require('chai'); const NodeResolver = require('../../../lib/resolver/node-resolver'); @@ -96,11 +98,11 @@ describe('support/compile-config', function() { }, function __resolve(path) { if (path === 'bpmnlint-plugin-foreign/package.json') { - return 'C:\\bpmnlint-plugin-foreign\\package.json'; + return os.platform() === 'win32' ? 'C:\\bpmnlint-plugin-foreign\\package.json' : '/bpmnlint-plugin-foreign/package.json'; } if (path === 'bpmnlint-plugin-foreign') { - return 'C:\\bpmnlint-plugin-foreign\\lib\\index.js'; + return os.platform() === 'win32' ? 'C:\\bpmnlint-plugin-foreign\\lib\\index.js' : '/bpmnlint-plugin-foreign/lib/index.js'; }