Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: add feed module on index
Browse files Browse the repository at this point in the history
  • Loading branch information
oureta committed Jan 27, 2016
1 parent 42c37d8 commit c946aa6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
9 changes: 7 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.auth = undefined;
exports.feed = exports.auth = undefined;

var _auth = require('./auth');

var auth = _interopRequireWildcard(_auth);

var _feed = require('./feed');

var feed = _interopRequireWildcard(_feed);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

exports.auth = auth;
exports.auth = auth;
exports.feed = feed;
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as auth from './auth';
import * as feed from './feed';

export {
auth
auth,
feed
};
12 changes: 7 additions & 5 deletions test-dist/feed/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ var _chai = require('chai');

var _utils = require('../lib/utils');

var _feed = require('../../dist/feed');
var _dist = require('../../dist');

var browse = _dist.feed.browse;

(0, _mocha.describe)('feed.browse', function () {
var cookie = process.env.COOKIE;

(0, _mocha.it)('should be defined,\n return a Promise,\n and fail if no authenticated', function (done) {
_chai.assert.ok(_feed.browse);
_chai.assert.typeOf((0, _feed.browse)(), 'Promise');
(0, _utils.shouldFail)((0, _feed.browse)(), done);
_chai.assert.ok(browse);
_chai.assert.typeOf(browse(), 'Promise');
(0, _utils.shouldFail)(browse(), done);
});

(0, _mocha.it)('should succeed if authenticated', function (done) {
(0, _utils.shouldSucceed)((0, _feed.browse)({}, { cookie: cookie }), function (feeds) {
(0, _utils.shouldSucceed)(browse({}, { cookie: cookie }), function (feeds) {
_chai.assert.isArray(feeds);
}, done);
});
Expand Down
3 changes: 2 additions & 1 deletion test/feed/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { describe, it } from 'mocha';
import { assert } from 'chai';
import { shouldFail, shouldSucceed } from '../lib/utils';

import { browse } from '../../dist/feed';
import { feed } from '../../dist';
const { browse } = feed;

describe('feed.browse', () => {
const cookie = process.env.COOKIE;
Expand Down

0 comments on commit c946aa6

Please sign in to comment.