Skip to content
Snippets Groups Projects
Commit 5c0787fe authored by nilstes's avatar nilstes
Browse files

added test and ci

parent 24030b70
No related branches found
No related tags found
No related merge requests found
image: node:6
before_script:
- npm install
test:
script:
- npm test
\ No newline at end of file
function sum(a, b) {
return a + b;
}
module.exports = sum;
\ No newline at end of file
const sum = require('./sum');
/*
beforeEach(() => {
initializeCityDatabase();
});
afterEach(() => {
clearCityDatabase();
});
test('city database has Vienna', () => {
expect(isCity('Vienna')).toBeTruthy();
});
test('city database has San Juan', () => {
expect(isCity('San Juan')).toBeTruthy();
}); */
test("adds 1 + 2 to equal 3", () => {
expect(sum(1, 2)).toBe(3);
});
\ No newline at end of file
{
"name": "myPackage",
"jest": {
"verbose": true,
"collectCoverage": true,
"coverageReporters": ["json", "html"]
},
"version": "0.0.1",
"dependencies": {
"body-parser": "^1.18.3",
"express": "^4.16.3",
"jest": "^23.6.0",
"mysql": "^2.16.0"
},
"scripts": {
"test": "jest"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment