Skip to content

Commit

Permalink
Merge pull request #55 from LarissaCns/exercicios/22.3
Browse files Browse the repository at this point in the history
Exercicios Mocha tests
  • Loading branch information
LarissaCns authored May 15, 2022
2 parents dab56a5 + b59e2df commit 4d68622
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 4d68622

Please sign in to comment.