Skip to content

Commit

Permalink
Merge branch 'master' into greenkeeper-nyc-10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath authored Dec 12, 2016
2 parents 0cbd2f3 + 56e860b commit 523fcf8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"uuid": "^2.0.2"
},
"devDependencies": {
"ava": "^0.16.0",
"ava": "^0.17.0",
"coveralls": "^2.11.9",
"eslint": "^3.1.1",
"eslint-config-punchcard": "^1.0.0",
Expand Down
11 changes: 4 additions & 7 deletions tests/content-types.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import test from 'ava';
import cloneDeep from 'lodash/cloneDeep';
import includes from 'lodash/includes';
import types from '../lib/content-types';
import only from '../lib/content-types/only.js';

Expand Down Expand Up @@ -80,14 +81,10 @@ test('Content Types', t => {
});
});

test('returns content types from default directory when no parameters', t => {
test('returns error on unfound content types default directory because tests have module root as process.cwd', t => {
return types()
.then(result => {
t.true(Array.isArray(result), 'Should return an array');
t.is(result.length, 1, 'Should only have one content type');
t.is(result[0].name, 'Content Type FOO', 'Get first content type name');
t.is(result[0].description, 'A non-traditionally placed fixture to test the default content-types directory', 'Get first content type desc');
t.is(result[0].id, 'default-config-foo', 'Get first content type id');
.catch(err => {
t.true(includes(err.message, 'ENOENT: no such file or directory, scandir'), 'Should return an error with non-object config');
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path';

test('Getplugins works with directory value as string', t => {
const input = {};
_.set(input, 'content.plugins.directory', path.join(process.cwd(), 'fixtures'));
_.set(input, 'content.plugins.directory', path.join(__dirname, 'fixtures'));
t.is(typeof utils.getPlugins(input), 'object');
});

Expand Down

0 comments on commit 523fcf8

Please sign in to comment.