Skip to content

Commit

Permalink
Merge 9f6ce0b into b0223c2
Browse files Browse the repository at this point in the history
  • Loading branch information
OlawaleJoseph committed Sep 10, 2019
2 parents b0223c2 + 9f6ce0b commit 42111f2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 57 deletions.
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"coverage": "nyc report --reporter=text",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"lint": "eslint \"**/*.js\" --ignore-pattern node_modules/ --fix",
"build": "babel ./src -d dist",
"clean": "rm -rf ./dist && mkdir dist",
"build": "npm run clean && babel ./src -d dist",
"heroku-postbuild": "npm run build && npm run migrate:prod && sequelize db:seed:all",
"start": "node dist/index.js",
"start:dev": "nodemon --exec babel-node -- src/index.js",
"migrate:dev": "sequelize db:migrate",
Expand All @@ -23,6 +25,13 @@
"author": "Andela Simulations Programme",
"license": "MIT",
"dependencies": {
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/node": "^7.6.1",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@hapi/joi": "^15.1.1",
"@sendgrid/mail": "^6.4.0",
"bcryptjs": "^2.4.3",
Expand Down Expand Up @@ -57,13 +66,6 @@
"underscore": "^1.9.1"
},
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/node": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
"@babel/preset-env": "^7.5.5",
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"coveralls": "^3.0.6",
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/routes/users/resetPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ const seedTestDb = async () => {
// Clear tables of seed
const clearTestDb = async () => {
try {
await models.User.destroy({ where: {}, force: true });
await models.Login.destroy({ where: {}, force: true });
await models.Reset.destroy({ where: {}, force: true });
await models.User.sync({ force: true });
await models.Login.sync({ force: true });
await models.Reset.sync({ force: true });
} catch (err) {
throw err;
}
Expand Down
45 changes: 0 additions & 45 deletions src/migrations/20190826132753-create-User.js

This file was deleted.

1 change: 0 additions & 1 deletion src/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Sequelize from 'sequelize';
const env = process.env.NODE_ENV || 'development';
// eslint-disable-next-line import/no-dynamic-require
const config = require(`${__dirname}/../config/config.js`)[env];

const sequelize = config.use_env_variable
? new Sequelize(process.env[config.use_env_variable], config)
: new Sequelize(config.database, config.username, config.password, config);
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 42111f2

Please sign in to comment.