Skip to content

Commit

Permalink
Reset the Node.js version before each test
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 21, 2018
1 parent 8d6a7b5 commit d5cf99b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test.js
Expand Up @@ -2,10 +2,17 @@ import os from 'os';
import {serial as test} from 'ava';
import importFresh from 'import-fresh';

const currentNodeVersion = process.versions.node;

test.beforeEach(() => {
Object.defineProperty(process, 'platform', {
value: 'linux'
});

Object.defineProperty(process.versions, 'node', {
value: currentNodeVersion
});

process.stdout.isTTY = true;
process.argv = [];
process.env = {};
Expand Down

0 comments on commit d5cf99b

Please sign in to comment.