Browse Source

add first `now.json` test case

Passing.
master
Nathan Rajlich 8 years ago
parent
commit
4ad921e958
  1. 1
      test/_fixtures/now-json/a.js
  2. 1
      test/_fixtures/now-json/b.js
  3. 5
      test/_fixtures/now-json/now.json
  4. 9
      test/_fixtures/now-json/package.json
  5. 8
      test/index.js

1
test/_fixtures/now-json/a.js

@ -0,0 +1 @@
// should not be included

1
test/_fixtures/now-json/b.js

@ -0,0 +1 @@
// should be included

5
test/_fixtures/now-json/now.json

@ -0,0 +1,5 @@
{
"files": [
"b.js"
]
}

9
test/_fixtures/now-json/package.json

@ -0,0 +1,9 @@
{
"name": "woot",
"version": "0.0.1",
"description": "",
"dependencies": {},
"files": [
"a.js"
]
}

8
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')
})

Loading…
Cancel
Save