-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
globs.js
30 lines (24 loc) · 940 Bytes
/
globs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use strict';
const {test} = require('tap');
const figures = require('figures');
const {execCli} = require('../helper/cli');
test('errors if top-level files is an empty array', t => {
execCli(['es2015.js'], {dirname: 'fixture/invalid-globs/files'}, (err, stdout, stderr) => {
t.ok(err);
let expectedOutput = '\n ';
expectedOutput += figures.cross + ' The ’files’ configuration must be an array containing glob patterns.';
expectedOutput += '\n';
t.is(stderr, expectedOutput);
t.end();
});
});
test('errors if top-level ignoredByWatcher is an empty array', t => {
execCli(['es2015.js'], {dirname: 'fixture/invalid-globs/ignored-by-watcher'}, (err, stdout, stderr) => {
t.ok(err);
let expectedOutput = '\n ';
expectedOutput += figures.cross + ' The ’ignoredByWatcher’ configuration must be an array containing glob patterns.';
expectedOutput += '\n';
t.is(stderr, expectedOutput);
t.end();
});
});