Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from RedRoundRobin/feature/FixCI
Browse files Browse the repository at this point in the history
Fix test suite
  • Loading branch information
lorenzodeinegri committed Mar 21, 2020
2 parents c5a8703 + 18c7985 commit 643af45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
4 changes: 2 additions & 2 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bot.command('login', message => {
}
})
.catch(err => {
console.log(err)
console.log(err);
//console.log(err.status);
if (err.response.status === 403) {
return message.reply("Rieffettua l'autenticazione usando il comando /login");
Expand All @@ -92,7 +92,7 @@ bot.command('login', message => {
const surname = data.surname;
const email = data.email;
const typeNumber = data.type;
let type = "Utente"
let type = "Utente";
if (typeNumber===1) {
type = "Moderatore";
} else if (typeNumber===2) {
Expand Down
25 changes: 3 additions & 22 deletions bot.test.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
//const sum = require('./bot');
// const jsonTest = require('./bot');
// /*
// test('adds 2 + 2 to equal 4', () => {
// expect(sum(2, 2)).toBe(4);
// });
const jsonTest = require('./bot');

// */
// test('extracts value from JSON formatted string', () => {
// let num = jsonTest();
// expect(num).toBe(42);
// });

function sum(n1, n2) {
return n1 + n2;
}

test('adds 2 + 2 to equal 4', () => {
expect(sum(2, 2)).toBe(4);
});

test('extracts value from JSON formatted string', () => {
test('Extracts value from JSON formatted string', () => {
let num = 4;
expect(num).toBe(4);
});
});

0 comments on commit 643af45

Please sign in to comment.