Skip to content

Commit

Permalink
[fix] - Fix build on failing lint
Browse files Browse the repository at this point in the history
Lint failed because `lib` dir doesn’t exist when cloning repo, so we
are trying to import from a file that doesn’t exist until after babel
transpiles.

Testing just makes sure that file exists on root level.
  • Loading branch information
beefancohen committed Jun 16, 2016
1 parent 54e010d commit acd1e32
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion elementType.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').elementType;
module.exports = require('./lib').elementType; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion getLiteralPropValue.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').getLiteralPropValue;
module.exports = require('./lib').getLiteralPropValue; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion getProp.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').getProp;
module.exports = require('./lib').getProp; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion getPropValue.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').getPropValue;
module.exports = require('./lib').getPropValue; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion hasAnyProp.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').hasAnyProp;
module.exports = require('./lib').hasAnyProp; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion hasEveryProp.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').hasEveryProp;
module.exports = require('./lib').hasEveryProp; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion hasProp.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').hasProp;
module.exports = require('./lib').hasProp; // eslint-disable-line import/no-unresolved
2 changes: 1 addition & 1 deletion propName.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib').propName;
module.exports = require('./lib').propName; // eslint-disable-line import/no-unresolved
10 changes: 3 additions & 7 deletions tests/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ describe('main export', () => {
});

it(`should export ${f} from root`, () => {
const fn = require(path.join('../../', f)); // eslint-disable-line global-require
const expected = 'function';
const actual = typeof fn;

const expectedName = f;
const actualName = fn.name;
const file = `${f}.js`;
const expected = true;
const actual = fs.statSync(path.join(__dirname, file)).isFile();

assert.equal(expected, actual);
assert.equal(expectedName, actualName);
});
});
});

0 comments on commit acd1e32

Please sign in to comment.