diff --git a/test/_fixtures/now-json/a.js b/test/_fixtures/now-json/a.js new file mode 100644 index 0000000..95c1988 --- /dev/null +++ b/test/_fixtures/now-json/a.js @@ -0,0 +1 @@ +// should not be included diff --git a/test/_fixtures/now-json/b.js b/test/_fixtures/now-json/b.js new file mode 100644 index 0000000..dcdb2da --- /dev/null +++ b/test/_fixtures/now-json/b.js @@ -0,0 +1 @@ +// should be included diff --git a/test/_fixtures/now-json/now.json b/test/_fixtures/now-json/now.json new file mode 100644 index 0000000..5acf2cb --- /dev/null +++ b/test/_fixtures/now-json/now.json @@ -0,0 +1,5 @@ +{ + "files": [ + "b.js" + ] +} diff --git a/test/_fixtures/now-json/package.json b/test/_fixtures/now-json/package.json new file mode 100644 index 0000000..c679e7f --- /dev/null +++ b/test/_fixtures/now-json/package.json @@ -0,0 +1,9 @@ +{ + "name": "woot", + "version": "0.0.1", + "description": "", + "dependencies": {}, + "files": [ + "a.js" + ] +} diff --git a/test/index.js b/test/index.js index d4c49d1..4df2279 100644 --- a/test/index.js +++ b/test/index.js @@ -165,3 +165,11 @@ test('prefix regression', async t => { t.is(base(files[0]), 'prefix-regression/package.json') t.is(base(files[1]), 'prefix-regression/woot.js') }) + +test.only('support `now.json` files', async t => { + let files = await getNpmFiles(fixture('now-json')) + files = files.sort(alpha) + t.is(files.length, 2) + t.is(base(files[0]), 'now-json/b.js') + t.is(base(files[1]), 'now-json/package.json') +})