Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Skip pnpm tests when nodeversion is < 12 (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Apr 7, 2021
1 parent 6deb812 commit 3507e2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test-10-pnpm/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 6 additions & 0 deletions test/test-11-pnpm/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 3507e2c

Please sign in to comment.