ignore_missing.js
1.05 KB
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
31
32
33
34
35
36
37
38
39
40
41
var browserify = require('../');
var test = require('tap').test;
test('ignoreMissing option', function (t) {
t.test('on browserify', function(t) {
t.plan(1);
var ignored = browserify({
entries: [__dirname + '/ignore_missing/main.js'],
ignoreMissing: true
});
ignored.bundle(function(err) {
t.ok(!err, "bundle completed with missing file ignored");
});
});
t.test('on .bundle', function(t) {
t.plan(1);
var ignored = browserify(__dirname + '/ignore_missing/main.js', {
ignoreMissing: true
});
ignored.bundle(function(err) {
t.ok(!err, "bundle completed with missing file ignored");
});
});
t.test('defaults to false', function (t) {
t.plan(1);
var expected = browserify(__dirname + '/ignore_missing/main.js');
expected.bundle(function(err) {
t.ok(err, 'ignoreMissing was false, an error was raised');
});
});
t.end();
});