diff --git a/test/test-10-pnpm/main.js b/test/test-10-pnpm/main.js index 71fe5723d..07c24b816 100644 --- a/test/test-10-pnpm/main.js +++ b/test/test-10-pnpm/main.js @@ -7,6 +7,12 @@ const path = require('path'); const assert = require('assert'); const utils = require('../utils.js'); +// ignore this test if nodejs <= 10 , as recent version of PNPM do not support nodejs=10 +const MAJOR_VERSION = parseInt(process.version.match(/v([0-9]+)/)[1], 10); +if (MAJOR_VERSION < 12) { + return; +} + assert(__dirname === process.cwd()); const target = process.argv[2] || 'host'; diff --git a/test/test-11-pnpm/main.js b/test/test-11-pnpm/main.js index 3912b9018..8e70b5b26 100644 --- a/test/test-11-pnpm/main.js +++ b/test/test-11-pnpm/main.js @@ -7,6 +7,12 @@ const path = require('path'); const assert = require('assert'); const utils = require('../utils.js'); +// ignore this test if nodejs <= 10 , as recent version of PNPM do not support nodejs=10 +const MAJOR_VERSION = parseInt(process.version.match(/v([0-9]+)/)[1], 10); +if (MAJOR_VERSION < 12) { + return; +} + console.log(__dirname, process.cwd()); assert(__dirname === process.cwd());