Skip to content

Commit

Permalink
Exercicios Mocha tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LarissaCns committed May 15, 2022
1 parent dab56a5 commit b59e2df
Show file tree
Hide file tree
Showing 6 changed files with 1,984 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const thisNumberIs = (number) => {
if(number > 0) {
return "positivo";
} else if(number === 0) {
return "neutro"
} else if(typeof number === "string") {
return "o valor deve ser um número"
}
return "negativo"
}

module.exports = thisNumberIs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// função de escrita de arquivos
const fs = require('fs');

const writingFile = (nomeDoArquivo, conteudoDoArquivo) => {
fs.writeFileSync(`${__dirname}/${nomeDoArquivo}`, conteudoDoArquivo);

return 'ok';
};

module.exports = writingFile;
Loading

0 comments on commit b59e2df

Please sign in to comment.