Skip to content

Commit

Permalink
Configure ESLint and Git Pre commit hook to run tests and ESlint format
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadowacu1 committed May 15, 2024
1 parent e3e1d19 commit 0baeefd
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Helpers
// Helpers
31 changes: 15 additions & 16 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import chai, { expect } from 'chai';
import chaiHttp from 'chai-http';
import app from './index';
import chai, { expect } from "chai";
import chaiHttp from "chai-http";
import app from "./index";

chai.use(chaiHttp);
const router = () => chai.request(app)
const router = () => chai.request(app);

describe('Initial configuration', () => {

it('Should retutn `Welcome to E-Commerce-Ninja-BackEnd` when GET on /', (done) => {
router()
.get('/')
.end((err, res) => {
expect(res).to.have.status(200);
expect(res.body).to.be.a('object');
expect(res.body).to.have.property('message', "Welcome to E-Commerce-Ninja-BackEnd");
done(err);
});
});
describe("Initial configuration", () => {
it("Should retutn `Welcome to E-Commerce-Ninja-BackEnd` when GET on /", (done) => {
router()
.get("/")
.end((err, res) => {
expect(res).to.have.status(200);
expect(res.body).to.be.a("object");
expect(res.body).to.have.property("message", "Welcome to E-Commerce-Ninja-BackEnd");
done(err);
});
});
});
2 changes: 1 addition & 1 deletion src/modules/user/controller/userControllers.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// user Controllers
// user Controllers
2 changes: 1 addition & 1 deletion src/modules/user/repository/userRepositories.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// user repositories
// user repositories
2 changes: 1 addition & 1 deletion src/modules/user/test/user.spec.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// user Tests
// user Tests
2 changes: 1 addition & 1 deletion src/modules/user/validation/userValidations.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// user validations
// user validations
2 changes: 1 addition & 1 deletion src/services/sendEmail.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Sending Email.
// Sending Email.

0 comments on commit 0baeefd

Please sign in to comment.