Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16]
os: [ubuntu-latest, windows-latest, macos-latest]
node: [10, 12, 14, 16, 18, 20, 22, 24]
os: [ubuntu-latest, windows-latest, macos-13]

steps:
- name: Clone repository
Expand Down
3 changes: 2 additions & 1 deletion lib/find_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module.exports = function (opts) {
configPath = fileSearch(configNameSearch, searchPaths);
}
// confirm the configPath exists and return an absolute path to it
if (fs.existsSync(configPath)) {
// Skip the call to fs.existsSync if configPath is null
if (configPath && fs.existsSync(configPath)) {
return path.resolve(configPath);
}
return null;
Expand Down
15 changes: 14 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var Module = require('module');
var exec = require('child_process').exec;

var expect = require('expect');
var sinon = require('sinon');
var resolve = require('resolve');

var Liftoff = require('../');
Expand Down Expand Up @@ -62,6 +61,13 @@ describe('Liftoff', function () {

describe('buildEnvironment', function () {
it('should locate local module using cwd if no config is found', function (done) {
if (process.versions.node.startsWith("10.") || process.versions.node.startsWith("12.")) {
this.skip();
return;
}

var sinon = require('sinon');

var test = new Liftoff({ name: 'chai' });
var cwd = 'explicit/cwd';
var spy = sinon.spy(resolve, 'sync');
Expand All @@ -79,6 +85,13 @@ describe('Liftoff', function () {
});

it('should locate global module using NODE_PATH if defined', function (done) {
if (process.versions.node.startsWith("10.") || process.versions.node.startsWith("12.")) {
this.skip();
return;
}

var sinon = require('sinon');

var test = new Liftoff({ name: 'dummy' });
var cwd = 'explicit/cwd';
var spy = sinon.spy(resolve, 'sync');
Expand Down
Loading