Skip to content

Commit

Permalink
test: clarify output when git submodules are missing (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfischer authored Jan 14, 2022
1 parent 1caf25f commit 3519c73
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/runtests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
'use strict';

var assert = require('assert');
var ohm = require('../lib/ohm/dist/ohm');
var ohm;
try {
ohm = require('../lib/ohm/dist/ohm');
} catch (e) {
/* istanbul ignore next */
throw new Error('Unable to import lib/ohm/dist/ohm; maybe you need to run ' +
'git submodule --init --recursive');
}
var fs = require('fs');
var path = require('path');
var semantics = require('../src/semantics');
Expand Down Expand Up @@ -241,9 +248,10 @@ var redX = '\u2717'.red.bold;

shell.ls().forEach(function (test) {
shell.cd(test);
if (shell.error())
/* istanbul ignore next */
/* istanbul ignore next */
if (shell.error()) {
shell.echo(test + 'is not a directory');
}
/* istanbul ignore next */
try {
if (shell.test('-f', 'config.json')) {
Expand Down

0 comments on commit 3519c73

Please sign in to comment.