Skip to content

Commit

Permalink
Enable automated tests on docker cloud (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMiaou authored Dec 22, 2017
1 parent d6222be commit 7ddb6aa
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 21 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"extends": "airbnb-base"
"env": {
"mocha": true
},
"extends": "airbnb-base",
"rules": {
"class-methods-use-this": "warn"
}
}
7 changes: 7 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3'
services:
sut:
build: .
command: bash ./scripts/run_tests_and_linter.sh
ports:
- '3000:3000'
135 changes: 115 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"@slack/client": "^3.14.2",
"body-parser": "^1.18.2",
"express": "^4.16.2",
"mocha": "^4.0.1",
"request": "^2.83.0",
"should": "^13.1.3",
"winston": "^2.4.0"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions scripts/run_tests_and_linter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm test && \
npm run lint
10 changes: 10 additions & 0 deletions test/mocys_booking_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require('should');
// const MacysBooking = require('./macys_booking');

describe('My App', () => {
it('should test something', (done) => {
const x = 1;
x.should.eql(1);
done();
});
});

0 comments on commit 7ddb6aa

Please sign in to comment.