Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop <> Master 2 #51

Merged
merged 40 commits into from
Sep 2, 2019
Merged

Develop <> Master 2 #51

merged 40 commits into from
Sep 2, 2019

Conversation

Mnickii
Copy link
Contributor

@Mnickii Mnickii commented Aug 30, 2019

No description provided.

@salviosage salviosage temporarily deployed to codepirates-ah-backend-pr-51 August 30, 2019 06:36 Inactive
@@ -0,0 +1,355 @@
import sinon from 'sinon';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,147 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,72 @@
import fs from 'fs';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,322 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,333 @@
import { chai, expect, server } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,48 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,304 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,118 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,29 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,74 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@nshutijonathan nshutijonathan temporarily deployed to codepirates-ah-backend-staging August 30, 2019 07:15 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend August 30, 2019 07:56 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend August 30, 2019 07:56 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend-staging August 30, 2019 07:56 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend-pr-51 August 30, 2019 07:56 Inactive
@@ -0,0 +1,145 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,272 @@
import sinon from 'sinon';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,13 @@
import { expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,74 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,65 @@
import { chai, server, expect } from './test-setup';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,11 @@
import Pusher from 'pusher';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,128 @@
import models from '../models/index';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,102 @@
import Sequelize from 'sequelize';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'


</html>`;

export default newFollowerTemplate;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,38 @@
export const newArticleTemplate = (userName, url) => `<!DOCTYPE html>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@salviosage salviosage temporarily deployed to codepirates-ah-backend-staging August 30, 2019 08:04 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend August 30, 2019 08:04 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend-pr-51 August 30, 2019 08:04 Inactive
@@ -0,0 +1,25 @@
import dotenv from 'dotenv';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,18 @@
/* eslint-disable require-jsdoc */
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,34 @@
/* eslint-disable require-jsdoc */
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,86 @@
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,127 @@
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,24 @@
export default {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,90 @@
import 'dotenv/config';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,38 @@
import Helper from '../helpers/helper';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,46 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,69 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,293 @@

import 'dotenv/config';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,25 @@
import dotenv from 'dotenv';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,18 @@
/* eslint-disable require-jsdoc */
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,34 @@
/* eslint-disable require-jsdoc */
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,86 @@
import models from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,64 @@


module.exports = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'module' is not defined no-undef

@@ -0,0 +1,24 @@
export default {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,90 @@
import 'dotenv/config';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,38 @@
import Helper from '../helpers/helper';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,46 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,293 @@

import 'dotenv/config';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,21 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,22 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,15 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,19 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,26 @@
import Joi from 'joi';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,14 @@
import Joi from 'joi';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,47 @@
import express from 'express';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

src/mock-data.js Outdated
}
};

export default fakeUsers;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,26 @@
import Joi from 'joi';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,38 @@
import Joi from 'joi';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,11 @@
import validator from 'validator';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,17 @@
import dotenv from 'dotenv';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,96 @@
import Joi from 'joi';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,37 @@
/* eslint-disable require-jsdoc */

import jwt from 'jsonwebtoken';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,29 @@
import 'dotenv/config';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,32 @@
import Util from '../helpers/util';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,25 @@
import Util from '../helpers/util';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,71 @@
import { Op } from 'sequelize';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,19 @@
import passport from 'passport';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@salviosage salviosage temporarily deployed to codepirates-ah-backend-staging August 30, 2019 08:42 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend-pr-51 August 30, 2019 08:42 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend August 30, 2019 08:42 Inactive
@@ -0,0 +1,13 @@
import multer from 'multer';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,41 @@
import Util from '../helpers/util';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,6 @@
import winston from 'winston';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,23 @@
import Helper from '../helpers/helper';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,103 @@
/* eslint-disable require-jsdoc */
import Util from '../helpers/util';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,38 @@
/* eslint-disable require-jsdoc */
export default class Util {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

}
}

static async tagLimit(tags) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: Unexpected token tagLimit

@@ -0,0 +1,129 @@
import cloudinary from 'cloudinary';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,5 @@
import open from 'open';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,18 @@
import Util from './util';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

salviosage and others added 11 commits August 30, 2019 13:04
* chore(eslint) add eslint dev dependencies

add eslint config airbnbbase and eslint import pligin dependencies

[Start #167313388]

* chore(eslint) add .eslintrc file

[Continue #167313388]

* chore(eslint) delete unwanted folders

[Continue #167313388]

* chore(eslint) delete unwanted files

[Continue #167313388]

* chore(eslint) add eslint dev dependencies

add eslint config airbnbbase and eslint import pligin dependencies

[Start #167313388]

* chore(eslint) add .eslintrc file

[Continue #167313388]

* chore(eslint) delete unwanted files

[Continue #167313388]
* chore(setup-travis-ci):Integrate TravisCI with readme badge [Finishes #167313386]

* chore(setup-travis-ci):Fix the failing travis [Finishes #167313386]

* chore(setup-travis-ci):Integrate travis CI with README  [Finishes #167313386]

* chore(setup-travis-ci):Change npm install to npm ci  [Finishes #167313386]

* chore(setup-travis-ci):Update the lock file  [Finishes #167313386]
Instlled sequelize
created src folder with config, migrations, models, seeds folders
configured postgres
created User model
Configured babel

[Finishes #167313387]
[Finishes #167595103]
* chore(api-doc): Setup API documentation using swagger

* chore(api documentation): Setup api documentation using swagger

  - create entry point of application in src/app.js
  - create swagger specification implementation in src/swagger.js
  - create api documentation endpoint in src/routes/api/inde.route.js
  - create 404 error route handler
  - create 500 error route handler
  - create pull request template

[Finishes #167313394]
* chore(houndci):added .hound.yml[finished#1167313389]

* chore(houndci):added houndci badge[finishes#1167313389]

* chore(houndci):added added new line .hound.yml[finishes#1167313389]
* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* rename imported server

* fix index route response property name error and stream line server name

* Update package.json

* Update package.json

* modify test script to report coverage

* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* rename imported server

* fix index route response property name error and stream line server name

* Update package.json

* modify test script to report coverage

* #167313389 Integrated HoundCi  (#5)

* chore(houndci):added .hound.yml[finished#1167313389]

* chore(houndci):added houndci badge[finishes#1167313389]

* chore(houndci):added added new line .hound.yml[finishes#1167313389]

* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* rename imported server

* fix index route response property name error and stream line server name

* Update package.json

* Update package.json

* modify test script to report coverage

* What does this PR do?

 Setup unit testing for the backend

Tasks to be accomplished

  - Add required dependancies for running tests
  - Create test directory with general test setup module
  - Update test running script
  - Test the index route

How to test the test setup

  - Clone this repo and run git checkout -b ch-api-test-setup-167313391
  - Run git pull ch-api-test-setup-167313391
  - Run npm test

Usage

  To add tests,
  - Open/Create a file for the given tests in the test directory, es test users
  - Import {chai, app} from ./test-setuo
  - Ensure that required modules/functions not in the test-setup package are imported from their respective sources
  - Write the test suite(s)/cases

Pivotal tracker story

  [finishes #167313391](https://www.pivotaltracker.com/story/show/167313391)

* rename imported server

* fix index route response property name error and stream line server name

* Update package.json

* modify test script to report coverage

* chore(coveralls):added coveralls badge[Finishes #167313393]

* add coveralls badge, change to use expect for assetion and fix typo

* remove duplicate application title

* remove duplicate title and improve index route test
* chore(heroku) add app.json file

to enable heroku to review each open pull request so that we can test app on heroku before merging branch to develop
[Starts #167313390]

* chore(heroku) add procfile
[Continue  #167313390]

* chore(heroku) add app.json file

to enable heroku to review each open pull request so that we can test app on heroku before merging branch to develop
[Starts #167313390]

* chore(heroku) add procfile
[Continue  #167313390]

* chore(heroku) add index.js to test
[Continue  #167313390]

* chore(heroku) add index.js to test
[Continue  #167313390]

* chore(heroku) rebase from develop
[Continue  #167313390]

* chore(heroku) finish heroku configuration
[Finishes  #167313390]
* updated develop branch

* feature(apis):implemented crud operations[finishes:167313396]

* feature(users):added username fields[finished:167313396]

* feature(code-refactoring):fixed-eslint[Finish:167313396]

* feature(tests):added tests[Finishes:167313396]

* feature(testing):added tests[Finishes:#167313396]

* feature(testing):fixed travis[Finishes:167313396]
…ation errors (#11)

* feature(signup-validations):Users should receive descriptive signup/Registration validation errors [Finishes 167313398]

* (signup-validation):Refactor validations [Finishes #167313398]

* (signup-validation):Refactor signup validations [Finishes #167313398]
* feature(signout): add user signout logic

* feature(logout): add user can logout functionality
minega25 and others added 19 commits August 30, 2019 16:08
* add migration models

* routes

* docummentation
…read an article functinality (#30)

[Finishes #167313415]
…mocked instead of the whole creating article route [Finishes #168000401] (#31)
*  updated develop

* User should get notifications

* feature(notifications): User should be able to get notifications [Finishes #167313410]

* feature(notifications):Remove unnecessary files [Finishes #167313410]

* feature(notifications):Remove all unnecessary files [Finishes #167313410]

* feature(notifications):Remove nodemailer files [Finishes #167313410]
* #167313411 Users should be able to tag articles

* remove console.log

* enable all tests
#44)

* feature(create articles): user can create, read, update, and delete an article [Finishes #167313403]

* basic bookmarking

* #167313417 user should be able to bookmark articles

* fix error in package-lock

* add package lock to git ignore

* correct status codes and refactor

* remove cascsede update for user to article association
…in the article, comment on the highlight, and share the highlight on different social platforms [Finishes #167313423] (#47)
…annels (#46)

* save changes

* feature(share-articles): Users should be able to share articles across different channels [Finishes #167313416]

* feature(share-articles): Use util helper fuctions [Finishes #167313416]

* reset to previous commit

* Updated doc.yml file
* 167313420 a user should be able to view their reading stats

[WIP #167313420]

* 167313420 user should be able to view their stats

[(Needs review) #167313420]

* rebase and incorporate latest changes

* 167313420 rebase and rename stats test to run before other stats populating test request

* resolve conflict in articles controller

* reolve conflict in articles ctrler

* reolve conflict in articles ctrler

* resolve merge conflict
* rating(paginating) paginate and refactor rating

[Starts #167313406]

* rating(refactor) add testing for rating and its pagination

[Finishes #167313406]
* save changes

* feature(share-articles): Users should be able to share articles across different channels [Finishes #167313416]

* feature(share-articles): Use util helper fuctions [Finishes #167313416]

* reset to previous commit

* Updated doc.yml file

* fix setError to setSuccess

* Fix setError to setSucess in comments file
@salviosage salviosage temporarily deployed to codepirates-ah-backend-staging August 30, 2019 16:26 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend-pr-51 August 30, 2019 16:26 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend August 30, 2019 16:26 Inactive
@@ -1,87 +1,116 @@
import database from '../models/index';
import Sequelize from 'sequelize';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,15 @@
/* eslint-disable require-jsdoc */
import StatsService from '../services/db.service';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -1,5 +1,10 @@
import db from '../models/index';
import db from '../models';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@salviosage salviosage temporarily deployed to codepirates-ah-backend August 30, 2019 16:30 Inactive
@salviosage salviosage temporarily deployed to codepirates-ah-backend-staging August 30, 2019 16:30 Inactive
@Mnickii Mnickii merged commit 9828602 into master Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants